Limitations of createTemporaryDocument?

According to the documentation: “there are limitations with some editing features.”


I am trying to create a temporary document and convert it to grayscale. It seems this does not work, and so far, I have not been able to find a single editing feature that does work. Does createTemporaryDocument support anything at all, is there a place to see what is supported? This feature would be super nice to utilize, and I’ve spent hours now trying to get it work, but coming to the conclusion that these features just might not be supported.


I’m interested in that too.

Bump… I’d also love to use this feature. Same here - spent a few hours trying. I’ve been able to confirm the creation of a temp doc and get its id, but that’s about it.

So, are you able to edit or export? I’m currently using duplicate documents but the progress shows up in the front of my eye. But in the doc, the temporary doc can do things in background

I’m interested too. Would be nice to have some enhanced documentation / guidance on how to use this createTemporaryDocument.

No, I haven’t had any success editing or moving things to or from the temp doc at all.

Once created, any operations I try to perform get applied to the activeDcoument, even if targeting the tempDoc id. Here’s how I’ve created a temp doc if anyone wants to tinker:

const currentDocID = app.activeDocument._id;

console.log(`Current document ID: ${currentDocID}`);

// Get the list of document IDs before creating the temporary document
const initialDocs = => ({ id: doc._id, doc }));

console.log("Initial document IDs:", =>;

console.log("Creating a temporary document");

// Create a temporary document inside a modal scope
await require('photoshop').core.executeAsModal(async () => {
    await require('photoshop').core.createTemporaryDocument({ documentID: currentDocID });
}, { "commandName": "Create Temporary Document" });
console.log("Temporary document created");

// Get the list of document IDs after creating the temporary document
const newDocs = => ({ id: doc._id, doc }));

console.log("New document IDs:", =>;

// Find the newly added document
const tempDoc = newDocs.find(d => ! =>;

if (tempDoc) {
    console.log(`Temporary document ID: ${tempDoc._id}`);

    // Perform operations on the temporary document (no success here so far)

    // Delete the temporary document
    await require('photoshop').core.deleteTemporaryDocument({ documentID: tempDoc._id });
    console.log("Temporary document deleted");

} else {
    console.log("Temporary document not found");