Answered
Creating separate pages pdf using (exportAsSinglePages, singlePagesPDFSuffix).
How to create single pages pdf for the selected range using script. Unable to find a solution through the forum except looping through pages.
How to create single pages pdf for the selected range using script. Unable to find a solution through the forum except looping through pages.
Hi @Singaaram , there are the exportAsSinglePages and singlePagesPDFSuffix properties in pdfExportPreferences. This exports pages 2 and 4 to a chosen folder using the PDF/X-4 preset
var f = Folder.selectDialog("Select a folder for the PDF pages");
var doc = app.documents.item(0);
var n = doc.name.replace(/\.[^\.]+$/, '')
var thePath = f + "/" + n + ".pdf";
var preset=app.pdfExportPresets.itemByName("[PDF/X-4:2008]");
//the exportAsSinglePages property set to true exports single pages. The singlePagesSuffix set to _the page number
app.pdfExportPreferences.properties = {pageRange:"2,4", exportAsSinglePages:true, singlePagesPDFSuffix:"_^P"}
doc.exportFile(ExportFormat.pdfType, File(thePath));
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.