4 ms·
PDF/A. All the good bits of PDF (compatibility, standardization, encapsulation), without the worst bits (media extensions, JavaScript). (Except PDF/A-4, which
by jl6 2y ago
PDF/A. All the good bits of PDF (compatibility, standardization, encapsulation), without the worst bits (media extensions, JavaScript).
(Except PDF/A-4, which reintroduces JavaScript for some horrific reason).
- azeemba 2y agoThe problem here was neither media extensions nor embedded JavaScript though. It was pdf.js handling of fonts
- agumonkey 2y agoThat said, a smaller spec may help people focus on more solid code. Potentially.
- bee_rider 2y agoPDF/A requires fonts to be embedded rather than linked, would that have saved the day?
- jl6 2y agoNo, /FontMatrix is part of a metadata object which can be present whether the font is embedded or external.
- eviks 2y agoThe worst bit of PDF since its inception (the worst since it covers the most common use case before media/JS) is that it's not a real digital document as in: simplistic digital things like selection©&paste are broken "by design"
- gruez 2y ago>is that it's not a real digital document as in: simplistic digital things like selection©&paste are broken "by design" Copy paste mostly works fine for me. I only have trouble when it's generated in a weird way (eg. scanned from a paper document then fed through OCR), or has complex formatting (eg. math equations) that have no hope of working correctly in any system. In those cases, I don't see how it's the fault of the PDF format, any more than HTML (or whatever you think is a "real digital document" format) can embed a picture of a scanned document that totally breaks copy-pasting.
- eviks 2y agoHow is inserting random line breaks, making it impossible to copy&paste a simple paragraph as a paragraph instead of a bunch of lines "fine"??? This is very common for regular non OCR pdfs, you don't need any math complexity (but also math equations have plenty of hope even though they're complex indeed, you can copy&paste some kind of "latex" representation that is sometimes used to ... produce those PDFs) > whatever you think is a "real digital document" format whatever supports basic digital interaction we've had available to use for many decades in alternative formats, or whatever doesn't have those rigid pre-digital-paper-based layout limitations where you can't use one of your most popular digital devices - your phone - to read a doc since the phone is smaller than a sheet of paper
- jl6 2y agoIt's not fine when it happens, but the issue you describe is a property of the PDF viewing application more than the PDF file format (which supports semantic paragraph tags, for example). Adobe Acrobat Reader handles copy & paste well.
- eviks 2y agoOf course Acrobat Reader doesn't handle it well since it's an inherent design flaw of the format despite your trying to deny the obvious. Just tried it - same issue, a paragraph of 3 lines is pasted as 3 lines > PDF file format (which supports semantic paragraph tags, for example). These are called newlines and have a pretty widespread support outside of some paper pockets of resistance! You only need some other semantic tags because the format fails at basics
- jl6 2y agoExample PDF? Because I tried it too and it worked. Does your PDF use tags?
- eviks 2y agoAny PDF from a generic google search? Here is one from Adobe https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf https://www.adobe.com/support/products/enterprise/knowledgec... Or even better: their annual investor docs a team of professionals has spent time carefully preparing... like this https://www.adobe.com/pdf-page.html?pdfTarget=aHR0cHM6Ly93d3cuYWRvYmUuY29tL2NvbnRlbnQvZGFtL2NjL2VuL2ludmVzdG9yLXJlbGF0aW9ucy9wZGZzL0FEQkUtMjAyNC1TdG9ja2hvbGRlci1MZXR0ZXIucGRm https://www.adobe.com/pdf-page.html?pdfTarget=aHR0cHM6Ly93d3... (but don't look at the annual report, that marvel of a public disclosure document not only doesn't copy&paste paragraphs, but has another nice niche use of PDF - you get garbage chars instead of text, rather ironic) https://www.adobe.com/pdf-page.html?pdfTarget=aHR0cHM6Ly93d3cuYWRvYmUuY29tL2NvbnRlbnQvZGFtL2NjL2VuL2ludmVzdG9yLXJlbGF0aW9ucy9wZGZzL0FEQkUtMjAyMy1Bbm51YWwtUmVwb3J0LnBkZg== https://www.adobe.com/pdf-page.html?pdfTarget=aHR0cHM6Ly93d3...