I'm looking for an automated solution (application, tool, script...) to the following problem.

I've got multiple PDF files and for each file I want to put a footer on the first page of the document. I do not possess the original sourcecode.

The footer consists of two parts. The left side should be some text with a clickable URL and the right side should be an image.

Both parts should be scaled dynamically in relation to the corresponding format of the document.

The URL is unique for each document and should contain the filename. e.g. www.example.com/;

If possible the URL itself should not be searchable in the document.

The version of the PDF is 1.4 (PDF/A-1a)

I've used LaTeX to create documents and presentation before but never thought about processing multiple files to modify them, so do you think its possible at all and if so, can you give me a hint?

  • 2
    Welcome to TeX.SE. Yes, definitely possible. Use \includepdf from the pgfpages package to include the existing pdf documents, along with atikzpicture with [overlay, remember picture] option to overlay what you desire. However, any links in the pdf existing file will not be in the new pdf file. – Peter Grill Nov 22 '18 at 7:54
  • You will almost certainly break the PDF/A-1a compliance most especially if you make any part "not be searchable" since that is the whole point of A and equally the image should have a corresponding Alt not forgetting you may damage the internal tagging. Your pdf is the sourcecode for attempting compliant editing in adobe products.--- all that apart just ensure you remove the internal metadata that declares the file is compliant since it clearly will no longer be so, and leaving it in may harm your sites reputation. – user170109 Nov 23 '18 at 2:38
  • @Martin: You can loop across files with LaTeX. If you make an initial attempt, we can help you when you get stuck. – Peter Grill Nov 24 '18 at 6:32
  • 1
    While I possibly could easily script the main part of your requirement (adding the footer), this would very likely destroy the (formal and complete) PDF/A-1a validity. How important is that for you? – Kurt Pfeifle Dec 21 '18 at 0:49

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.