Skip to main content
September 28, 2010
Answered

Exporting InDesign to PDF without opening any files?

  • September 28, 2010
  • 1 reply
  • 2765 views

Is it possible to do the following WITHOUT actually opening an InDesign file?

    // Open, Export, & Close
    for (x = myFileAmount;x >= 0; x--) {
        app.open(File(myFolderContents));

        numHyperlinks += createHyperlinks();

        app.activeDocument.exportFile(
        ExportFormat.pdfType, File(myFolder.fsName + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"), false, myPreset);
        app.activeDocument.close(SaveOptions.no);
    }

Thanks!

This topic has been closed for replies.
Correct answer tomaxxi

Can you read a book without opening it?

What you can do is not to show document window. Just make sure you close all active documents.

// Open, Export, & Close
for (x = myFileAmount ;x >= 0; x--) {
    app.open(File(myFolderContents),false);

    numHyperlinks += createHyperlinks();

    app.documents[0].exportFile(ExportFormat.pdfType, File(myFolder.fsName + "/" + app.documents[0].name.split(".indd")[0] + ".pdf"), false, myPreset);
    app.documents[0].close(SaveOptions.no);
}

Hope that helps.

--

tomaxxi

http://indisnip.wordpress.com/

1 reply

tomaxxi
tomaxxiCorrect answer
Inspiring
September 28, 2010

Can you read a book without opening it?

What you can do is not to show document window. Just make sure you close all active documents.

// Open, Export, & Close
for (x = myFileAmount ;x >= 0; x--) {
    app.open(File(myFolderContents),false);

    numHyperlinks += createHyperlinks();

    app.documents[0].exportFile(ExportFormat.pdfType, File(myFolder.fsName + "/" + app.documents[0].name.split(".indd")[0] + ".pdf"), false, myPreset);
    app.documents[0].close(SaveOptions.no);
}

Hope that helps.

--

tomaxxi

http://indisnip.wordpress.com/

September 28, 2010

Thanks!