0

I use enscript to add page numbers to PDF files generated from libreoffice. I use the following script and have always started numbering at page 1. Now I want to start numbering at page 600 and my guesses don't work. The script still writes page numbers starting at page 1.

I know " -b'||$% ' " is what writes the page number. I have changed "seq 1 900" to "seq 600 900" but it still starts at 1. So I changed $% to $(i) as per the man pages which say % means current page but then there are no pages numbers. I tried $(for i in $(seq 609 900)) and get a ) on every page. $i(for i in $(seq 609 900)) gives no page numbers. Clearly I am thrashing.

There are 300 pages in the current PDF. Here is the original script.

enscript -F Times-Roman16 -L1 -b'||$% ' -o- < <(for i in $(seq 1 900); do echo; done) | ps2pdf - | pdftk 'original.pdf' multistamp - output numbered.pdf

The script came from http://www.dry-lab.org/blog/2018/numbering-pages-of-a-pdf

Thank you.

Strider22
  • 21
  • 4
  • What a convoluted script! This can all be done in one go with cpdf: try `cpdf -bates 600 -add-text "%Bates" -font-size 16 in.pdf -o out.pdf`. This will add on the top left, so you may need a positioning command too. – johnwhitington Sep 01 '23 at 16:13
  • Now we're releasing the tools for free, under a special not-for-commercial-use license. per https://community.coherentpdf.com/ but only This download is strictly for evaluation only. – Strider22 Sep 01 '23 at 21:15
  • The first sentence is correct; the second is not. For non-commercial use there is no "evaluation only" restriction. – johnwhitington Sep 02 '23 at 22:05

0 Answers0