How to assemble (legal) appendix from PDFs with page numbers, title, index

I think my need must be fairly common - to assemble a legal appendix. In this case all components are PDF format.
I know I can manage PDF documents in a master document, but I couldn’t get any further, so here I am.

PDFs should appear as the originals did - not reduced to make room for more borders and headers and footers.

Page numbers should overwrite the PDFs at top center, boxed, in format “A###”, where ### is the page number.

If I can do those two things in Writer, then I will try the next step - to add a title page and index. Advance suggestions to use an automatic TOC are welcome - like, can I put my index entries in headers, different header per PDF document?

You can’t include PDF files in a Writer document, moreover import its headings to create a TOC. If you can’t put your hands on other formats for the original components, I’m afraid your question wouldn’t be solved with LO Writer.

The best I could find is to export the PDFs to a set of JPG files, then insert the JPGs in a Writer document, one per page.

Having JPEG files mean a lot of manual work, all the most considering your requirement of keeping the original size. Provided the image is sent to background, it should be possible to override the page number as A###. But it is impossible to retrieve outline information from the images, therefore you can’t have an automatic TOC. Having different headers is easy but, again, since no document information can be extracted from images, manual work!

I believe that PHP offers tools to build ODF files from scratch. It should not be impossible to write a script that creates a new file, then inserts all jpeg files in a folder as links in that document. It can probably be done in BASIC or Python as well.

Thanks. folks, for your help. No good answer in Libre, but maybe there could be without too much trouble.

I think I speak for many who must assemble appendices from static PDF documents, particularly pro se litigants for court appeals:

  1. Perhaps writer could one day embed and print PDFs as they originally appear, maybe in a Master Document, borderless or cropped so as to use the original scale and border.
  2. Then perhaps header/could superimpose, like a text box over the image. I don’t think that’s possible now.
  3. Header/footer already allow suitable numbering, such that one can add “A” or “CA” before the page-numbers field, and control that field.
  4. One can already add a unique header/footer for each document, I think.
  5. Then the document titles can be included in the header/footer and formatted so as to appear in the TOC. I think that works already.

As it is, I’m going to have to subscribe to Adobe Acrobat and pray, or literally paste numbers on 400 pages and scan them, or work out some trick in between.

With the additional install of the free command line tool PDFtk you can try:

This can “import” PDFs such way that the will be layed onto (or behind) the LO-document pages. So you can put a white box into the header to override (hide) the existing PDF-page numbers.

Also: LibreOffice 5.3+ allows to insert the 1st page of a PDF as vector image via “insert->image”. So if you just have to insert some pages then this could be the way to go.