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.