So one of my pdfs has a page number and a link at the bottom of every page. It’s around 500 pages so I dont want to edit it manually. Is there any way I can delete those things all at once from all pages of the pdf?

Maybe ghost script or python script can do this?

I also notice there isn’t a PDF community in Lemmy, maybe somebody should create one.

Thanks a lot in advance.

  • golden_zealot@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 days ago

    Tell him to learn how to code?

    Optimally yes, the OP should learn some code before doing so - this task doesn’t seem that difficult to do with a script if you wrote it yourself, and it’s even less work to learn enough to just verify what the script is doing.

    I have no idea how a car works at a deep level. However I know enough to know how to drive, and if I see its mirrors are broken off, the seat belts are missing, or there is gas leaking out of it onto the ground, I probably shouldn’t get in and drive it.

    If you don’t understand code and run generated code, the problem is that you are stuck with a result that you may or may not have wanted. You may also just think it worked correctly when in fact It might have done other stuff as well that can’t be seen plainly - this is the inherent risk of running generated code where you can’t actually verify what it’s doing.

    Maybe it performs the requested function correctly but is sourcing the original code from a use case where someone also wanted to delete every other kind of file that wasn’t a pdf in that directory. Maybe not. But this is a difference of one line of code which can have major ramifications if it gets left in.

    The point is that if you aren’t certain what something does before you use it, you should at a minimum go through the necessary steps to be able to make an informed decision, otherwise it’s just reckless.