no, you can’t edit an existing pdf, the nonstandard form filling extension notwithstanding. you can extract as much information as possible from it and recreate it. that’s what “pdf editors” are doing. and since it’s not officially supported, any edit can screw the file up.
the reason you can’t just edit it is that pdf is basically a container for program code that runs on printers. so you can have text interspersed with formatting information, or text with non-existent characters approximated by vector images, or text that’s been rendered to a raster image and is not actually in the document. then you have the fact that pdf can embed specialized fonts, compressed files, security measures, and even internal programs. and it’s all offset-based in there so you need to modify the entire file structure in order to get it working again after adding text. what’s worse, since any file with a pdf document in it is a valid pdf document according to the spec, less reputable “pdf editors” can just embed whatever shit they want. it’s a common malware vector.
it’s much safer to re-build the document from source. if you don’t have the source, there are tools to extract just the textual content.
Ok, this definitely helps in understanding how PDF works. However, I really do edit PDFs regularly and have no problems with the edited ones. Already mentioned it ITT, PDF-Xchange lets me do so many things that listing them would sound like an advertisement. Editing the existing text tends to mess it up, that’s true, but it’s not crucial for me and all sorts of other actions work almost perfectly.
You’re imagining some very ideal circumstances for working with PDFs that have nothing to do with my own needs, so I can’t really make use of your advice. :/
I frequently download book and journal article PDFs, scan books myself, and upload them online. And ofc read them.
Editing the PDFs in my case includes e.g. adding the outline/bookmarks that allow for easier navigation, adding OCR, cropping, splitting and rearranging the pages when the scanned images aren’t ideal, removing watermarks…
that sounds like actual typesetting work! i’m very surprised that you don’t get access to the source. usually when uploading to a journal they want the latex source.
I’m not uploading to a journal. I upload stuff e.g. to Internet Archive. When I download stuff from various databases (journals, academic repositories, Google Books), it ranges from recent publications to stuff from several centuries ago, in which case a scan is all you can get.
I’m not sure if I’m following you - a compiler can be used to edit an existing PDF?
no, you can’t edit an existing pdf, the nonstandard form filling extension notwithstanding. you can extract as much information as possible from it and recreate it. that’s what “pdf editors” are doing. and since it’s not officially supported, any edit can screw the file up.
the reason you can’t just edit it is that pdf is basically a container for program code that runs on printers. so you can have text interspersed with formatting information, or text with non-existent characters approximated by vector images, or text that’s been rendered to a raster image and is not actually in the document. then you have the fact that pdf can embed specialized fonts, compressed files, security measures, and even internal programs. and it’s all offset-based in there so you need to modify the entire file structure in order to get it working again after adding text. what’s worse, since any file with a pdf document in it is a valid pdf document according to the spec, less reputable “pdf editors” can just embed whatever shit they want. it’s a common malware vector.
it’s much safer to re-build the document from source. if you don’t have the source, there are tools to extract just the textual content.
Ok, this definitely helps in understanding how PDF works. However, I really do edit PDFs regularly and have no problems with the edited ones. Already mentioned it ITT, PDF-Xchange lets me do so many things that listing them would sound like an advertisement. Editing the existing text tends to mess it up, that’s true, but it’s not crucial for me and all sorts of other actions work almost perfectly.
You’re imagining some very ideal circumstances for working with PDFs that have nothing to do with my own needs, so I can’t really make use of your advice. :/
in what circumstance does pdf editing come up regularly?
I frequently download book and journal article PDFs, scan books myself, and upload them online. And ofc read them.
Editing the PDFs in my case includes e.g. adding the outline/bookmarks that allow for easier navigation, adding OCR, cropping, splitting and rearranging the pages when the scanned images aren’t ideal, removing watermarks…
that sounds like actual typesetting work! i’m very surprised that you don’t get access to the source. usually when uploading to a journal they want the latex source.
I’m not uploading to a journal. I upload stuff e.g. to Internet Archive. When I download stuff from various databases (journals, academic repositories, Google Books), it ranges from recent publications to stuff from several centuries ago, in which case a scan is all you can get.