• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to export PDF of only odd or only even pages

Engaged ,
Nov 29, 2015 Nov 29, 2015

Copy link to clipboard

Copied

I completed a press job in which copy was only on the odd pages with a design on the even pages (same on all even pages). After it was complete, the customer decided they wanted a copy with only the odd pages to display on a screen during an event. I was looking for a way to export a PDF of only the odd pages but didn't find it. It was easy to do with printing to a PDF -- there I could either print only odd or even pages or just choose to not print blank pages (after deleting the content on the even side master page). I've learned here that one should always use export rather than printing to PDF -- is there any (easy) way to accomplish this task with export?

Views

20.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Nov 30, 2015 Nov 30, 2015

Here's a link to an efficient method to delete unwanted pages in Acrobat:

delete multiple pages at one time (Edit PDF)

Votes

Translate

Translate
People's Champ ,
Nov 29, 2015 Nov 29, 2015

Copy link to clipboard

Copied

The easiest way to do this is to export the PDF as usual, and in the Range field, type the name of all the odd pages separate by a comma:

1,3,5,7,9,11,13 etc.

(Use Excel or something to create the list of numbers).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 29, 2015 Nov 29, 2015

Copy link to clipboard

Copied

I guess that is the easiest way -- but for me printing to PDF was much easier. I think that a one point ID's PDF presents included an option to skip blank pages, didn't it? I would think there should still be such an option and/or one to print only odd or even pages.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 29, 2015 Nov 29, 2015

Copy link to clipboard

Copied

Auto page numbering, threaded text frames through pages? If none, you could try this script for deleting even pages and exporting then:

var curpage = 1;

app.activeDocument.pages[curpage].remove();

while (curpage < app.activeDocument.pages.length)

{

try{

curpage += 1;

app.activeDocument.pages[curpage].remove();

}catch(e){};

}

dirty workaround, I know...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 29, 2015 Nov 29, 2015

Copy link to clipboard

Copied

That could work -- no threaded text frames and no page numbering. Still seems like overkill for what should be a simple task.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 29, 2015 Nov 29, 2015

Copy link to clipboard

Copied

yeah, life's not easy. But interesting

say this for devs.

we're just poor users here.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

For documents with many pages you can script the PDF's page range field. This AppleScript (OSX only) will do it for the active document:

tell application "Adobe InDesign CC 2014"

    set p to ""

    try

        repeat with i from 1 to count of pages of active document

            if i mod 2 is 1 then

                set p to p & i & ", " as string

            end if

        end repeat

        set p to characters 1 thru ((count of p) - 2) of p

        set page range of PDF export preferences to (p as string)

        invoke (item 1 of every menu action whose id is 113411)

    end try

end tell

So for a 500 page document you get this:

ps.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

Rob, that won't work for me as I'm on a PC. It could probably be scripted for a PC too, but it seems that Luke's suggestion is simpler. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

In case you want to try it the JS is:

http://www.zenodesign.com/forum/oddPages.zip

main();

function main(){

    var p ="";

    for(i = 0; i < app.activeDocument.pages.length; i++){

        if (i%2==1){

            p=p+i+", "

        }

    }

    app.pdfExportPreferences.pageRange=p

    app.menuActions.itemByID(113411).invoke();

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

rob day wrote:

In case you want to try it the JS is:

http://www.zenodesign.com/forum/oddPages.zip

  1. main(); 
  2. function main(){ 
  3.     var p =""
  4.     for(i = 0; i < app.activeDocument.pages.length; i++){ 
  5.         if (i%2==1){ 
  6.             p=p+i+", " 
  7.         } 
  8.     } 
  9.     app.pdfExportPreferences.pageRange=p 
  10.     app.menuActions.itemByID(113411).invoke(); 

Am I supposed to edit the script or something? Now, when I run it (ID CC 2015), it just takes me to the export dialog but doesn't change the pages to export. Have I missed a step?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

Hmmm, I'm testing on a Mac in 2014, I also forgot to trim the extra comma at the end of the page range in the Javascript version and that might be a problem. So you could try this version:

http://www.zenodesign.com/forum/oddPages2.zip

main();

function main(){

    var p ="";

    for(i = 0; i < app.activeDocument.pages.length; i++){

        if (i%2==1){

            p=p+i+", "

        }

    }

    p = p.substring(0, p.length - 2);

    app.pdfExportPreferences.pageRange=p

    app.menuActions.itemByID(113411).invoke();

}

Which gives me this for an 8 page doc:

Screen Shot 2015-11-30 at 12.27.30 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

rob day wrote:

Hmmm, I'm testing on a Mac in 2014, I also forgot to trim the extra comma at the end of the page range in the Javascript version and that might be a problem. So you could try this version:

http://www.zenodesign.com/forum/oddPages2.zip

  1. main(); 
  2. function main(){ 
  3.     var p =""
  4.     for(i = 0; i < app.activeDocument.pages.length; i++){ 
  5.         if (i%2==1){ 
  6.             p=p+i+", " 
  7.         } 
  8.     } 
  9.     p = p.substring(0, p.length - 2); 
  10.     app.pdfExportPreferences.pageRange=p 
  11.     app.menuActions.itemByID(113411).invoke(); 

Which gives me this for an 8 page doc:

Screen Shot 2015-11-30 at 12.27.30 PM.png

No, that didn't work either; still just took me to the standard export dialog.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

Did you try the compiled version in the zip archived I linked, or are you cut and pasting the code?

http://www.zenodesign.com/forum/oddPages2.zip

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

LATEST

rob day wrote:

Did you try the compiled version in the zip archived I linked, or are you cut and pasting the code?

http://www.zenodesign.com/forum/oddPages2.zip

Yes, I downloaded the ZIP and used that version.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

Here's a link to an efficient method to delete unwanted pages in Acrobat:

delete multiple pages at one time (Edit PDF)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 30, 2015 Nov 30, 2015

Copy link to clipboard

Copied

Luke, thank you. That actually will work in ID as well -- I've even done something similar. Don't know why I didn't think of it here.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines