I have a pdf file created with pdflatex and hyperref / ocgx2 packages.
How can I create a pdf out of this containing a range of pages (say pages 2 to 5) preserving the ocg?
Usually I do:
pdftk orig.pdf cat 2-5 output new.pdf which gives me a pdf file of pages 2 to 5 but does seem to break the ocg. (Originally I had hidden content that could be made visible clicking on a link. After pdftk the hidden content is always visible.)
Ideally I am looking for a solution that works from pdf to pdf. If that is not possible, I'd also be happy to recompile the tex file specifying the page range somewhere in the .tex.