1

I am trying to add line numbers to a PDF of a thousand pages. I only have the PDF and don't have the source text that was used to generate the PDF. As part of my research, I have reviewed the following answer that was provided in a thread nearly 10 years ago:

https://tex.stackexchange.com/a/18776/232607

I would have commented on that thread, but it requires that I have more points. Therefore I am not sure if there are any better solutions now, nearly 10 years on? The above solution uses ImageMagick and pgfplotstable. the ImageMagick solution, looks like it would be perfect for me, but my knowledge of computing is extremely basic and I don't understand the explanation. Can anyone explain the following:

  1. ImageMagick - My knowledge of ImageMagick is very basic and I can just about convert one image format to another from the command line. Please would someone mind explaining how to use the shell script? Can it work in windows or is it easier to use in linux? Is it a matter of saving the script to a txt file and dragging a pdf file onto the script?

  2. pgfplotstable - I really don't understand how this is used in the context of line numbering.

Marijn
  • 37,699
  • Welcome to TEX.SE. Do you want the same ladder of numbers stamped on each page (like a court transcript template), or do you want only printed text to be numbered (like a poetry book). The ImageMagick solution sounds like the latter. – Cicada Jan 10 '21 at 06:46
  • Thanks for your reply. I want it to be like court transcript line numbering. But the line numbers must correspond with the lines and not be off place – tommydog35 Jan 10 '21 at 11:24
  • @Jake's imagemagick image processing scripts would be the way to go, then (or OCR, or some other way to locate line positions for Tex). I don't have unix so cannot do the incantations, – Cicada Jan 12 '21 at 10:08

0 Answers0