Is there any tool that competes with Adobe Acrobat? Like the censoring tool is rarely founs anywhere else.
So you want to modify the text of a PDF by hand (2020)
91–100 of 103 posts
Re: So you want to modify the text of a PDF by hand (2020)
#92Earlier quoted context omitted.
That's awesome. I'm relying a lot on Amazon Textract for my PDF parsing needs. Do you have any other insights on how to do a good job at that natively, i.e. without a cloud provider? Especially when dealing with tables.
PDF format does not give you enough semantic information to understand there is a table. The stream contains instructions such as moving to a coordinate, adding some text, adding some lines. No tool can extract tables with 100% precision.
Re: So you want to modify the text of a PDF by hand (2020)
#93Is there any tool that competes with Adobe Acrobat? Like the censoring tool is rarely founs anywhere else.
PDF-XChange Editor. Not really used it much (have Acrobat for work and have checked that some things work as far as viewing).
Re: So you want to modify the text of a PDF by hand (2020)
#94You can do this: pdf2ps a.pdf # convert to postscript "a.ps" vim a.ps # edit postscript by hand ps2pdf a.ps # convert back to pdf Some complex pdf (with embedded javascript, animations, etc) fail to work correctly after this back and forth. Yet for "plain" documents this works alright. You can easily remove watermarks, change some words and numbers, etc. Spacing is harder to modify. Of course you need to know some po…
If you can put javascript and animations in pdf, what's stopping you from making a frontend in it? I wonder what are the frontiers of things you can do in pdf. Honestly, it seems like only malware authors benefit from the complexity of pdfs.
http://sdh33b.blogspot.com/2008/07/icfp-contest-2008.html?m=...
Re: So you want to modify the text of a PDF by hand (2020)
#95Earlier quoted context omitted.
PDF format does not give you enough semantic information to understand there is a table. The stream contains instructions such as moving to a coordinate, adding some text, adding some lines. No tool can extract tables with 100% precision.
Yeah, but Textract uses OCR/computer vision even in PDFs with embedded text data and it can extract tables incredibly well. I believe there isn't an open source equivalent. Maybe some advanced usage of tesseract?
https://github.com/tabulapdf/tabula
Are the documents scans, or do they have real text on them? It’s worth trying to convert them to svg or html using “mutool convert” and then seeing what you can do with the results. If you’re dealing with the same type of document each time you’ll probably find the patterns in there are common enough that you can easily grab what you want.
Re: So you want to modify the text of a PDF by hand (2020)
#96Earlier quoted context omitted.
> I’m a sadist, I read it for fun. I think this is called masochist. Now, if you participated in writing the spec or were making others read it...
Yup, slip of the tongue. Though, I do make other people read the spec at work, so I’m that too.
Re: So you want to modify the text of a PDF by hand (2020)
#97The PDF specification is wild. My current favourite trivia is that it supports all of Photoshop's layer blend modes for rendering overlapping elements.[1] My second-favourite is that it supports appended content that modifies earlier content, so one should always look for forensic evidence in all distinct versions represented in a given file.[2] It's also a fun example of the futility of DRM. The spec includes passwo…
Re: So you want to modify the text of a PDF by hand (2020)
#98What people often miss about PDF is that it's closer to an image format in some ways than to a Word document. Word documents, PDFs and images are in document editing what DAW projects, midis and mp3 files are in music and what Java source code, JVM bytecode and pure x86 machine code are in software. The primary purpose of a PDF file is to tell you what to display (or print), with perfect clarity, in much fewer bytes…
The original goal of PDF was to have a portable print fidelity copy; WYSIWYG for real. You could take a PDF file and print it on a laser printer, a linotype, or a screen and it would look the same. If you printed it on a postscript printer it would look exactly the same (or better, if you used type 1 fonts).
That's the primary requirement of PDF, and has been since the beginning.
They added a bunch of interactive stuff to it, which are used occasionally (forms). But to understand PDF you need to understand the above first.
Re: So you want to modify the text of a PDF by hand (2020)
#99The PDF specification is wild. My current favourite trivia is that it supports all of Photoshop's layer blend modes for rendering overlapping elements.[1] My second-favourite is that it supports appended content that modifies earlier content, so one should always look for forensic evidence in all distinct versions represented in a given file.[2] It's also a fun example of the futility of DRM. The spec includes passwo…
Re: So you want to modify the text of a PDF by hand (2020)
#100Earlier quoted context omitted.
That also breaks search (and more importantly screen reader accessibility), and if you're professionally required to specifically produce PDFs with these security features enabled, you're pretty likely to be working in a context where that would be illegal.
It is impossible to stop text copying without breaking screen reading, because the screen reader could just log everything it reads.