As an example, consider this pdf file.

Would it be possible to edit the pdf, such as removing a logo, the page numbering and even frames, and save the result as a pdf? I would like to keep the pdf vectorial data and actually remove the content, not just hide with a white rectangle.

The reason I am asking is that I have a lot of pdf files that I would like to "clean" in a batch MMA script. The solution can call external software (my OS is Ubuntu).

enter image description here

  • $\begingroup$ It is easy to add a blank rectangle in front of the logo (easy), which leaves the data itself in the pdf file, just not visible when printing or looking on a screen. Presumably you want more. For that you'll need to be more precise as to whether all pdf files you have have exactly the same structure, and you'd have to look into the pdf file itself (with a text editor) to see if they are binary or plain text (depends on the compression level) etc. $\endgroup$ – Bruno Le Floch Nov 4 '17 at 22:47
  • 1
    $\begingroup$ At tex.stackexchange.com/questions/38145/… I see the suggestion that qpdf --qdf --object-streams=disable test.pdf test-long.pdf makes a pdf that is easier to work with (not compressed). Perhaps you can then find the part to remove (some knowledge of the pdf format is needed). $\endgroup$ – Bruno Le Floch Nov 4 '17 at 22:54
  • $\begingroup$ @BrunoLeFloch To fill my needs, I have to 1) be able to read the uncompressed pdfs in MMA, 2) understand the structure of the pdfs to edit them. I agree that it cannot really be answered... I tried the qpdf command, as well as pdftk to uncompress, unfortunately I have some invalid characters. I need to sort that out first... $\endgroup$ – anderstood Nov 6 '17 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.