TransWikia.com

How to add line numbers to a PDF?

TeX - LaTeX Asked by tommydog35 on August 17, 2021

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. Has anyone written an idiots guide for this? If anyone could explain the following, I would be very grateful:

  1. ImageMagick – My knowledge of ImageMagick is very basic and I can just about convert one image format to another from the command line – that’s the extent of my skills! 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. Again if anyone would be kind enough to explain in an idiots guide, I would be very grateful.

I highlight that I am in desperate need to number lines in the PDF, so if anyone could help by providing idiot proof instructions, I will gladly make a donation to a charity of their choice.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP