1 Reply Latest reply on Apr 19, 2008 12:01 AM by (Robert_Tkaczyk)

    Strange behavior with pageRange property (specifying ranges)

      Hello everyone,

      I'm trying to export two PDFs from one INDD in script. I want the first to include the first two pages and the second to include pages 3 through the last. When specifying a page range like this:

      app.pdfExportPreferences.pageRange = '3-' + _doc.pages.length;

      IDS always exports the full document as a PDF (doesn't skip pages 1 and 2).

      I tried this too (with spaces):

      app.pdfExportPreferences.pageRange = '3 - ' + _doc.pages.length;

      But it had the same result. I've run this script in the debugger and check the value of pageRange. It's correct (_doc.pages.length returns a valid last page number).

      If I do this:

      app.pdfExportPreferences.pageRange = '1';

      That works just fine.

      Is there a trick to exporting a range of pages that I'm not seeing? I've verified it on two machines (my local and the server).

      Thanks,
      Eric