Copy link to clipboard
Copied
I am wondering if this is possible. I don't want the window to automatically open when I export the pdf's...
I am automating and this would create so many windows in the system.
Any ideas on how I could get this to stop?
Copy link to clipboard
Copied
Hi,
what window do you mean? Does your pdf viewer opens every pdf after its creation?
To change this use this:
app.pdfExportPreferences.viewPDF = false;
Greetings
Copy link to clipboard
Copied
Hi bagonterman ,
does "opens a window" mean that you are seeing a new window of a folder in the file system showing the exported PDF ?
If so you are using method execute() on the parent of the File that is constructed for the export method.
Regards,
Uwe
Copy link to clipboard
Copied
I did mean that. I got around this by not exporting that way. And instead just exported multiple times.
Copy link to clipboard
Copied
> I got around this by not exporting that way. And instead just exported multiple times.
I completely do not understand this. Could elaborate?
Copy link to clipboard
Copied
app.interactivePDFExportPreferences.exportAsSinglePages = true;
app.interactivePDFExportPreferences.rasterResolution = RasterResolutionOptions.NINETY_SIX_PPI;
app.interactivePDFExportPreferences.pdfMagnification = PdfMagnificationOptions.FIT_VISIBLE;
app.interactivePDFExportPreferences.viewPDF = false;
try {
doc.exportFile("Adobe PDF (Interactive)", filePath + "/" + job_Num + dataGrade + ".pdf", false);
}
catch (err) { $.writeln(err) }
This changed to this.
app.interactivePDFExportPreferences.exportAsSinglePages = false;/////exports multiple pages but opens a window by default.
app.interactivePDFExportPreferences.rasterResolution = RasterResolutionOptions.NINETY_SIX_PPI;
app.interactivePDFExportPreferences.pageRange = "1-1";
app.interactivePDFExportPreferences.viewPDF = false;
app.interactivePDFExportPreferences.pdfMagnification = PdfMagnificationOptions.FIT_VISIBLE
try {
doc.exportFile("Adobe PDF (Interactive)", filePath + "/" + job_Num + property + "_interactive" + ".pdf", false);
}
catch (err) { $.writeln(err) }
app.interactivePDFExportPreferences.pageRange = "2-2";
try {
doc.exportFile("Adobe PDF (Interactive)", filePath + "/" + job_Num + property + "_print" + ".pdf", false);
}
catch (err) { $.writeln(err) }
Copy link to clipboard
Copied
Hi bagonterman ,
see into the first argument of exportFile().
For exporting PDF Interactive you'd better use the enumerator:
ExportFormat.INTERACTIVE_PDF or its corresponding enumeration number 1952409936 .
Adobe InDesign CS6 (8.0) Object Model JS: Document
Adobe InDesign CS6 (8.0) Object Model JS: ExportFormat
If that is not working try method asynchronousExportFile() where you can also define ExportFormat.INTERACTIVE_PDF as first argument:
Adobe InDesign CS6 (8.0) Object Model JS: Document
Regards,
Uwe
Copy link to clipboard
Copied
Check the object model. The document.exportFile() function has a parameter to suppress the PDF export dialog:
exportFile (format, to, showingOptions, using versionComments, forceSave)
So you would use false as the third parameter.
P.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now