38
submitted 2 days ago* (last edited 1 day ago) by happeningtofry99158@lemmy.world to c/opensource@lemmy.ml

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.

you are viewing a single comment's thread
view the rest of the comments
[-] golden_zealot@lemmy.ml 2 points 1 day ago* (last edited 1 day 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.

this post was submitted on 20 Jun 2025
38 points (95.2% liked)

Open Source

38137 readers
217 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS