I'm trying to export a PDF of a scanned book. Regardless of whether I try to use GIMP or LibreOffice Draw, I can't seem to name any of the cover pages! I want to have the page numbers on the exported PDF match the page numbers in the lower-right corner of the document, but I can't figure out how to make either program do this, nor do I know which one to use if neither is capable of this.

There's a front cover, a back cover, and each cover has something printed on its inside. I want to give these 4 pages special names to keep the numbering for the actual book content accurate. How do I accomplish this?

  • export to what format? Jun 8, 2022 at 21:33
  • To PDF. I have scanned pages in .png format, and I'm trying to reassemble them into a PDF for digital distribution. I'd like the cover pages to not mess up the numbering for the content pages.
    – VHS
    Jun 8, 2022 at 23:57

2 Answers 2


Okay, so I found a few answers elsewhere on Stack Overflow that answers my question. Very few programs can perform this process on a PDF, so you'll need to do it by hand in a plain-text editor that can handle files tens of megabytes large and won't choke on or corrupt the binary data in the embedded images. I used vim for this.

Search for the string Catalog in the PDF, then in the opening double angle brackets << add the following:

/PageLabels << /Nums [
0 << /P (Front Cover) >>
1 << /P (Front Cover, Inner) >>
2 << /S /D >>
26 << /P (Back Cover, Inner) >>
27 << /P (Back Cover) >>
] >>

Making the relevant changes for your PDF. These were just the particular page numbers and options relevant to me. The first number is the page number, starting from 0. The /P says that I want the text in parentheses to be the page title. The /S /D says that I want to start the numbering in Arabic numerals with page 1 being the third page of the PDF. There are a lot of options to use here. More information about this process and the available options can be found at these links:






If you are trying to name specific pages in a PDF document, you can use a PDF editor like Adobe Acrobat or Foxit PhantomPDF. These programs allow you to edit the PDF metadata, including the page labels.

To add page labels in Adobe Acrobat, follow these steps:

Open the PDF document in Adobe Acrobat. Go to the "Pages" panel on the left side of the screen. Right-click on the page you want to label and select "Page Labels". In the "Page Labels" dialog box, select "Start New Label" and enter a name for the page label (e.g., "Front Cover"). Repeat this process for each page you want to label. Click "OK" to save your changes.

Once you have added the page labels, you can export the PDF with the correct page numbering by selecting "File" > "Export" > "PDF" and choosing "Document and Markups" under the "Export Settings". This will preserve the page labels and the corresponding page numbers in the exported PDF.

Alternatively, if you don't have access to Adobe Acrobat, you can use a free online PDF editor like DeftPDF (https://deftpdf.com/pdf-editor) to rename the pages and then export the PDF with the desired page numbering.

Full disclosure: We're the developer of the tool we recommend and we think it can help you, hence the recommendation. We would be happy to see you try it to help you and you can send a message/comment if there's further assistance needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.