So you want to modify the text of a PDF by hand (2020)
41–50 of 103 posts
Re: So you want to modify the text of a PDF by hand (2020)
#42Anybody trying to do this is missing the point of PDF: It’s a page-description format and therefore only represents the marks on a page , not document structure . One should not attempt to edit a PDF, one should edit the document from which the PDF is generated.
[1] https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandard...
Re: So you want to modify the text of a PDF by hand (2020)
#43Anybody trying to do this is missing the point of PDF: It’s a page-description format and therefore only represents the marks on a page , not document structure . One should not attempt to edit a PDF, one should edit the document from which the PDF is generated.
Re: So you want to modify the text of a PDF by hand (2020)
#44It would reach the point where things would start to break, and .... "good times were had, by all".
Re: So you want to modify the text of a PDF by hand (2020)
#45What followed was a deep dive down the rabbit hole, a lot of fiddling with the same tools the author of this gist is using trying to make sense of it all.
The final solution worked better than I thought while at the same time felt incredibly wrong.
I'm very thankful for all the (probably painful) work that went into those open source PDF tools.
Re: So you want to modify the text of a PDF by hand (2020)
#46Earlier quoted context omitted.
It is a shame Adobe designed a format so hard to work with that people are amazed when someone accomplishes what should be a basic task with it. Their design philosophy of creating a read-only format was flawed to begin with. What's the first feature people are going to ask for??
> It is a shame Adobe designed a format so hard to work with PDF was not designed to be editable, nor for anyone to "work with" it in that way. It was designed (at least the original purpose circa 1989) to represent printed pages electronically in a format that would view and print identically everywhere. In fact, the initial advertising for the "value" of the PDF format was exactly this, no matter where a recipient…
The weird thing to me is people using a distribution format as an original source. It's right up there with video cameras shooting an acquisition source as an MP4 and all of the negative baggage that comes with that.
Re: So you want to modify the text of a PDF by hand (2020)
#47That’s a matter of the toolset. I program C#, and I have good experience with that open source library: https://www.nuget.org/packages/iTextSharp-LGPL/ It’s a decade old by now, but PDF ain’t exactly a new format. That library is not terribly bad for many practical use cases. Particularly good when you only need to create the documents as opposed to editing them, because for that use case you’d want to use an old version of the format anyway, for optimal compatibility.
Re: So you want to modify the text of a PDF by hand (2020)
#48It's relatively performant and it's a mature and supported codebase that can accomplish most pdf tasks.
Re: So you want to modify the text of a PDF by hand (2020)
#49Earlier quoted context omitted.
> It is a shame Adobe designed a format so hard to work with PDF was not designed to be editable, nor for anyone to "work with" it in that way. It was designed (at least the original purpose circa 1989) to represent printed pages electronically in a format that would view and print identically everywhere. In fact, the initial advertising for the "value" of the PDF format was exactly this, no matter where a recipient…
Wasn't the PDF format based on the Illustrator format? The weird thing to me is people using a distribution format as an original source. It's right up there with video cameras shooting an acquisition source as an MP4 and all of the negative baggage that comes with that.