Why "app.pdfExportPreferences.pageRange = PageRange.allPages;" didn't work the 1st time?
I tried, with a script to export all pages.
However, when I manually export a single page (say page 6) from File>>Export>>.
Then, I run the script and it still exports page 6.
The 2nd time I run the script, it exports all pages.
Is there a cache? How do I clear it?
Seems like someone on the forum mentioned this, The problem does not seem to have been resolved.
The next sentence is the same. 2nd entry into force.
app.pdfExportPreferences.pageRange = PageRange.ALL_PAGES;
try {
if (myDialog.show() == 1) {
var myPDFExportPreset = app.pdfExportPresets.item(myDropdown.selection.text);
myDocument.exportFile(ExportFormat.PDF_TYPE, myPDFFile, false, myPDFExportPreset);
app.pdfExportPreferences.pageRange = PageRange.allPages;
} else {
alert('Export canceled');
}
}
catch (e) { alert("is OPEN……") }
