Skip to main content
Participating Frequently
September 27, 2017
Question

Export singel pages to PDF

  • September 27, 2017
  • 2 replies
  • 327 views

Hi,

I am trying to export singel page PDFs from an Indesign document but no matter what settings I use the result is a spread and always viewed in Acrobat.
This is my code so far:

app.pdfExportPreferences.exportReaderSpreads = false
app.pdfExportPreferences.pageRange = '4';
app.pdfExportPreferences.viewPDF = false;
curDoc.exportFile(1952409936, myPDFFile, false, myPDFPreset);

I guess I should set either ExportRangeOrAllPages.EXPORT_RANGE or PageRangeFormat.EXPORT_PAGE_RANGE but they are not part of pdfExportPreferences and I can't figure out where to set them.

InDesign CC2017

Thanks!

This topic has been closed for replies.

2 replies

Sunil Yadav
Legend
September 28, 2017

with(app.pdfExportPreferences){

     pageRange = "1";

     }

or You can make a variable pageRange and store your page ranges into it and assign it....

And then.....

app.activeDocument.exportFile(ExportFormat.pdfType, File("/c/myTestDocument.pdf"), false, myPDFExportPreset);

GunIvaAuthor
Participating Frequently
September 28, 2017

Figured it out, I used the wrong preferences. The right ones in my case are: app.interactivePDFExportPreferences