Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing a replacement for \include that will only include the file if it has been modified. To do this I need to delete or extract files from a pdf. I am using lua to do all this.

I see there are some cmd line tools to do it: http://www.verypdf.com/wordpress/201112/delete-specified-pdf-pages-using-command-line-15756.html

But is there any easier way? Ultimately I would like to extract/copy only a subset of pages from a pdf to a new pdf rather than copy the whole file(which may be large) into another then delete the pages.

share|improve this question
Have you taken a look at Merge two outputted PDFs from LaTeX?? –  Jake May 13 '12 at 20:23
@Jake I'm trying to do much more than that... make a conditional include or includepdf –  Uiy May 13 '12 at 20:38
Sorry, I should have been clearer: I meant that you can use \includepdf[pages=...] to specify which pages to include. –  Jake May 13 '12 at 20:42
@Jake Yes, I know that. I will use it, but I am trying to trim down the pdf's in the first place so it is quicker and they take up less space. –  Uiy May 13 '12 at 20:59
If you know the page numbers of the pieces you want to extract the answer here might help: tex.stackexchange.com/questions/54157/… –  Ethan Bolker May 14 '12 at 0:40
show 4 more comments

closed as off topic by Jake, Thorsten, topskip, percusse, cmhughes May 14 '12 at 13:18

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.