is there any possibility to export only the odd page numbers or only the even page numbers in InDesign? I guess this should be possible, because it works in the print dialog. Perhaps it needs only typing a special character combination in the dialog box? Thanks in advance Matthias
Both scripts and the idea in general - getting names of the pages - are obvious and very clever at the same time.
I hope you won't mind if I'll use it in my ID-Tasker as a new Rule - but with much greater potential...
User will be able to find something - objects or texts and/or sort and filter by any text/object property - then this Rule will collect all names of the pages for print/export - with or without filtering duplicates - and user will be able to print/export pages in an alphabetical or numerical order - based on any property...
Should be very handy when doing DataMerge and when results are not initially in the desired order... Or for any other purpose.
My signature isn't just an empty slogan - and this forum is a gold mine for new ideas.
James's idea to print to the PDF driver is interesting, but it won't let you select a preset or make any other adjustments. Uwe's idea of using a spreadsheet or some way to generate a list of odd or even numbers works only if the pages are numbered with plain Arabic numbers (and you need to know the document's extent). That leaves Barb's idea of a script, see below.
To use it, open the document you want to export and run the script. At the prompt, type odd or even and click OK. The script copies a string with page numbers (rectos or versos) to the clipboard.
Then export the document, and copy the page string into the 'Range:' field.
(Unfortunately it's not possible to pre-set or pre-fill the PDF export dialog, so the script plugs the string in a temporary text frame, copies its content, and removes it. Rather than removing the frame the script undoes its addition so that it leaves no footprint in the document.)
(function () {
var reply = prompt ('Enter odd or even',
'odd', 'Print odd or even pages');
if (!reply) {
exit();
}
if (reply.toLowerCase() === 'odd') {
start = 0;
} else if (reply === 'even') {
start = 1;
} else {
exit();
}
var s = '';
var pp = app.activeDocument.pages.
everyItem().getElements();
for (var i = start; i < pp.length; i=i+2) {
s += pp[i].name + ',';
}
var frame = app.activeDocument.textFrames.add ({
contents: s.replace(/,$/,''),
});
frame.parentStory.paragraphs[0].select();
app.copy();
app.activeDocument.undo();
}());
James's idea to print to the PDF driver is interesting, but it won't let you select a preset or make any other adjustments.
I'd suggest only — and was thinking — that this kind of printing is probably not for demanding prepress, so plain-vanilla "printing" would probably serve many needs. Maybe not the OP's, though.
Scripting extends InDesign's default functionality, but within the InDesign feature set, the only option to use Export to PDF is to type in the pages you want and separate them with a comma.
Range: 1,3,5,7,9,11 etc
Not very helpful for a long document unless you do it all the time, in which case you could type in once and copy/paste that string from another file when you need it.