News for hackers. Stuff that matters.
Re:Preview in macOS Big Sur is destroying PDFs by xxpor on Wednesday December 16, 2020 @03:37PM (#25448256)
Why anyone treats PDF as anything but a write-once format is beyond me. It's so finicky that I'm not shocked bugs like this happen. The only programs I'd be reasonable sure wouldn't screw it up are Acrobat itself, and pdflatex and friends.

I think we need a multi-image container format. It could be something that's literally a bunch of jpgs/pngs/pick your poison in a tar container, and given a new extension. OSes would open it and present it as a gallery in order. There's no value in a non-ocr'd PDF existing. For OCR'd text that gets more complicated, but it feels like we should be able to come up with a common denominator that doesn't have the legacy of a binary format derived from postscript in the early 90s.

Re:Preview in macOS Big Sur is destroying PDFs by systemvoltage on Wednesday December 16, 2020 @03:44PM (#25448339)
PDF is one of the best things IMO - it's like a docker container for documents. The way the original authors intended it to be, including fonts and all the things that go into making a document.

For example, I personally like to purchase books that are in PDF format, not epub/mobi. I want to rely on professional typesetting from the publishers, not some front-end engineer's vision of what the ebook should look like and how it should be presented to the user. It works only for novels and long form reading where typesetting is not critical. Basically any book that also has a good audiobook version works fine with epub/mobi since visual formatting is a non-issue. For everything else - programming books to research papers, PDF is great. Can PDF format be improved? Sure, but the level of adoption and its widespread use is more important than fixing copy paste and content migration aspects of PDFs.

What I absolutely DO NOT WANT - is web page like format with auto-flowing text and something that fits to the screen with user styling/typesetting. That IMO defeats the purpose of what the container is supposed to do, i.e. contain and not leak. It should most definitely have fixed physical dimensions (or pixels).

Re:Preview in macOS Big Sur is destroying PDFs by wtallis on Wednesday December 16, 2020 @05:25PM (#25449630)
> PDF is one of the best things IMO - it's like a docker container for documents. The way the original authors intended it to be, including fonts and all the things that go into making a document.

Sounds like you want the PDF/A standard for archiving: https://en.wikipedia.org/wiki/PDF/A

It forbids embedding audio and video and JavaScript, requires embedding all the fonts, forbids encryption and patent-encumbered compression. It's basically the PDF format with the most regrettable features stripped out.

Re:Preview in macOS Big Sur is destroying PDFs by Terretta on Wednesday December 16, 2020 @06:25PM (#25450183)
That PDF/A URL surprised me.

Curiously, Wikipedia doesn't think it's a page or a subpage.

https://en.wikipedia.org/wiki/Special:PrefixIndex/Wikipedia:...

Re:Preview in macOS Big Sur is destroying PDFs by MrSomeone on Wednesday December 16, 2020 @06:45PM (#25450352)
Wikipedia has subpages disabled in the main article namespace, which makes slashes in article names possible.

https://en.wikipedia.org/wiki/WP:TITLESLASH

Re:Preview in macOS Big Sur is destroying PDFs by opheliate on Wednesday December 16, 2020 @06:41PM (#25450307)
I think the reason it's not appearing there is because you're looking in the "Wikipedia:" namespace, which is actually used for meta pages, not articles (e.g: https://en.wikipedia.org/wiki/Wikipedia:FAQ).

Searching under the Article namespace (which contains the actual contents of the encyclopedia), it is included: https://en.wikipedia.org/wiki/Special:PrefixIndex/PDF

Re:Preview in macOS Big Sur is destroying PDFs by sim_card_map on Wednesday December 16, 2020 @09:53PM (#25451842)
We now have JavaScript in PDFs?..
Re:Preview in macOS Big Sur is destroying PDFs by hedora on Wednesday December 16, 2020 @11:02PM (#25452306)
Of course. Postscript was turing complete, which makes it problematic for document interchange and printing, so they restricted it and called the result “pdf”.

At some point people realized they couldn’t embed arbitrary scripts in pdf files, so they added JavaScript.

Now we have the best of both worlds. It makes perfect sense if you think about it(?)

Re:Preview in macOS Big Sur is destroying PDFs by franga2000 on Thursday December 17, 2020 @04:03AM (#25453887)
Oh how I envy your ignorance... :)

Jokes aside, yes, we certainly do, and it is every bit is horrible as you might imagine and then some. I've seen people basically re-create spreadsheets in it, with the not entirely unexpected effect of updating the values taking up to 20 seconds.

Re:Preview in macOS Big Sur is destroying PDFs by cratermoon on Wednesday December 16, 2020 @10:04PM (#25451926)
We have for a long time, except it was called "ActionScript", and was used for another Adobe product: Flash animations.
Re:Preview in macOS Big Sur is destroying PDFs by inetknght on Wednesday December 16, 2020 @03:51PM (#25448456)
> I want to rely on professional typesetting from the publishers, not some front-end engineer's vision of what the ebook should look like and how it should be presented to the user.

I, on the other hand, do not whatsoever trust publishers. PDF runs software and that means that everything under the sun including malware and DRM can run on PDF -- and indeed that has occurred many times. It should be a non-starter for anyone who actually values the ability to read their content on any device they want.

Re:Preview in macOS Big Sur is destroying PDFs by Wowfunhappy on Wednesday December 16, 2020 @04:03PM (#25448616)
> PDF runs software and that means that everything under the sun including malware and DRM can run on PDF -- and indeed that has occurred many times.

You can basically avoid this problem by only opening PDFs in programs like Preview and Evince, and never Acrobat.

Re:Preview in macOS Big Sur is destroying PDFs by ValentineC on Wednesday December 16, 2020 @06:18PM (#25450125)
> You can basically avoid this problem by only opening PDFs in programs like Preview and Evince, and never Acrobat.

Except some bank forms won't work [1], because someone, at some point in history, thought it was a great idea to embed phone-home DRM and "security" into PDFs.

[1] e.g. this form from Standard Chartered https://av.sc.com/sg/content/docs/BusinessBankingSmartAccoun...

Re:Preview in macOS Big Sur is destroying PDFs by dvfjsdhgfv on Wednesday December 16, 2020 @04:24PM (#25448907)
Re:Preview in macOS Big Sur is destroying PDFs by tjohns on Wednesday December 16, 2020 @04:44PM (#25449181)
Having vulnerabilities is never great. However, this is a separate issue from whether the PDF reader explicitly allows code execution or supports some of the more obscure PDF extensions, which is what the parent was talking about.
Re:Preview in macOS Big Sur is destroying PDFs by dec0dedab0de on Wednesday December 16, 2020 @05:13PM (#25449497)
isnt including fonts basically code execution in and of itself?
Re:Preview in macOS Big Sur is destroying PDFs by junon on Wednesday December 16, 2020 @05:16PM (#25449537)
Aside from potential vulnerabilities (bugs), no. Font formats are declarative. The various tables that define conditionals et al have no ability to run arbitrary code, and certainly do not have any concept of scripting and the like.
Re:Preview in macOS Big Sur is destroying PDFs by dialamac on Wednesday December 16, 2020 @05:44PM (#25449804)
Ttf has bytecode for a stack interpreter with conditionals and loops (jump instructions and loop all). That’s declarative in the sense that all code is data, but i would say it is imperative.
Re:Preview in macOS Big Sur is destroying PDFs by junon on Tuesday December 22, 2020 @05:25AM (#25504822)
Yes but it is a strict set of very limited codes, nothing which gains access to the machine a la syscalls.
Re:Preview in macOS Big Sur is destroying PDFs by cratermoon on Wednesday December 16, 2020 @10:06PM (#25451939)
Re:Preview in macOS Big Sur is destroying PDFs by junon on Tuesday December 22, 2020 @05:23AM (#25504814)
First line says "except vulnerabilities".
Re:Preview in macOS Big Sur is destroying PDFs by systemvoltage on Wednesday December 16, 2020 @03:54PM (#25448491)
There are many other formats, a myriad of text formats from asciidocs to markdown. For embedded devices and such, they work great I presume.

Please don't mess with PDFs. 20+ year old technology that is shitty but works, I prefer keeping the status-quo.

Re:Preview in macOS Big Sur is destroying PDFs by x86_64Ubuntu on Wednesday December 16, 2020 @04:31PM (#25448999)
If PDF had an "accident", and someone was able to do to it what Steve Jobs did to Flash, I would be very happy.
Re:Preview in macOS Big Sur is destroying PDFs by systemvoltage on Wednesday December 16, 2020 @04:47PM (#25449225)
Are there any other "fixed" or "docker-like" formats for documents besides PDFs that solves a lot of problems with PDF format? From what I understand, PDF is an xml based document standard.
Re:Preview in macOS Big Sur is destroying PDFs by pjmlp on Wednesday December 16, 2020 @04:58PM (#25449347)
Nope, PDF doesn't have anything to do with XML.
Re:Preview in macOS Big Sur is destroying PDFs by kall on Wednesday December 16, 2020 @05:34PM (#25449713)
Are web pages/archives really less fixed than PDFs if you don‘t want want them to be? I mean I know they are in practice, but I don‘t see why you couldn‘t use them as a fixed document format.

Some contracts may need to be upheld between creator and consumer. If the consumer doesn‘t want to, well, that‘s freedom, isn’t it?

Of course it is the most code executing document format to ever execute code, so if that was the issue...

Is postscript (that‘s what PDFs are ultimately right?) capable of thing‘s that HTML+CSS+SVG isn‘t?

Edit: Oh no I completely blanked on the fact that web pages literally don‘t have pages. Seems like a big one.

Re:Preview in macOS Big Sur is destroying PDFs by simion314 on Wednesday December 16, 2020 @06:16PM (#25450105)
>Are web pages/archives really less fixed than PDFs if you don‘t want want them to be? I mean I know they are in practice, but I don‘t see why you couldn‘t use them as a fixed document format.

Web content is not that fixed, same code can redner different in different browsers this is why sometimes we need to use some css reset rules to attempt to make stuff render as similar as possible.

What is great with PDF it that it should look and print the same everywhere, I always have issues withfor example .doc files that don't look and print the same on my machine as the sender one and it is just a few lines of normal text, nothing fancy.

So a PDF replacer should be identical on all machines this means a extremely strict specifications with no place where implementation could deviate a pixel.

Re:Preview in macOS Big Sur is destroying PDFs by systemvoltage on Wednesday December 16, 2020 @06:29PM (#25450216)
Yea, you can use `position: fixed` or `position: absolute` with CSS + HTML but as you said, it doesn't dictate pages. Although, now that I think about it, why do we need pages :) Just fixed layout is good enough.
Re:Preview in macOS Big Sur is destroying PDFs by leephillips on Wednesday December 16, 2020 @10:10PM (#25451969)
The pdf2htmlEX program does this. It creates exact renditions of PDFs in HTML, using embedded fonts and positioning each character. Personally, although it’s an amazing demonstration, I don’t really understand the purpose, when you can just distribute the PDF.

https://github.com/coolwanglu/pdf2htmlEX

Re:Preview in macOS Big Sur is destroying PDFs by arthur2e5 on Wednesday December 16, 2020 @05:28PM (#25449665)
You are thinking about XPS, Microsoft's OOXML-based page description language.
Re:Preview in macOS Big Sur is destroying PDFs by pjmlp on Wednesday December 16, 2020 @04:57PM (#25449340)
You mean setting back the Web 10 years behind, with WebAssembly still not exposing everything that Flash + CrossBridge were capable of, and all the Web tools that try to replicate Flash IDE still don't come close to it in HTML5?

Nah, better leave PDF as it is, we don't need any accident.

Re:Preview in macOS Big Sur is destroying PDFs by markandrewj on Wednesday December 16, 2020 @04:29PM (#25448965)
Generally the PDF copy of a book is designed to fit the format of the final printed book. The PDF is even often the deliverable sent to press.

If you are using something like an e-reader, or a smartphone, the PDF layout often doesn't translate well. Typesetting is also normally also done for ePub/Mobi, but the layout is tailored to the format of the device that the document will be read on. Although there are times when publishers just take the PDF and click 'convert to ePub', which isn't ideal.

There are also other advantages to different formats, when talking about things like programming books. As an example, working code snippets for web formats. I am thinking of things like Jupyter notebook when I say this.

As others have mentioned there are also a number of security risks associated with PDF.

I can't deny there are several books I have read in PDF format however.

Re:Preview in macOS Big Sur is destroying PDFs by kall on Wednesday December 16, 2020 @05:42PM (#25449782)
I do believe this happens, but I have yet to read a book that looks even reasonably typeset on Apple Books on a phone with anything larger than default.

I know a PDF can‘t do that either, but that‘s the promise of these formats right? Between the most typography focused tech company and whatever the publisher puts into the file, they don‘t deliver.

Re:Preview in macOS Big Sur is destroying PDFs by omnimus on Wednesday December 16, 2020 @06:57PM (#25450453)
There are two issues here:

1. PDFs are fully baked/static and made for one page format (the one original book was printed on). These will never work.

2. Ebook formats are basically webpages and they have CSS. There are defaults from the ebook reader app and but often there are css settings from the publisher of the book. Their css styles mash together leading quite often to bad results. They could be very responsive but i suspect publishers test only on Kindle/ebook readers.

I am not sure why they just don't make one "master" style thats tested everywhere. But it's probably because they are not software companies. For them epub/mobi just might mean "black and white ebook release".

Also mobi is probably most of the sales and it is pretty restricted design wise compared to epub.

So basically blame the publishers.

Re:Preview in macOS Big Sur is destroying PDFs by leephillips on Wednesday December 16, 2020 @10:14PM (#25451993)
What do you mean “PDF can‘t do that either”?
Re:Preview in macOS Big Sur is destroying PDFs by Wowfunhappy on Thursday December 17, 2020 @10:26AM (#25456379)
> Generally the PDF copy of a book is designed to fit the format of the final printed book. The PDF is even often the deliverable sent to press.

I believe this is precisely what the GP finds appealing about PDFs. A PDF (usually) constitutes the original copy, reproduced faithfully.

It's like the difference between buying a widescreen VHS versus one that uses pan-and-scan to fit the movie to your TV's aspect ratio. Sure, the widescreen copy may not be ideal for your viewing environment, but it's the version the director intended for you to see.

And for both eBooks and movies, you can work around the problem by using more appropriate hardware.

Re:Preview in macOS Big Sur is destroying PDFs by odyssey7 on Wednesday December 16, 2020 @05:53PM (#25449894)
Knuth as a book author has written about this on his website.

“Warning: Unfortunately, however, non-PDF versions have also appeared, against my recommendations, and those versions are frankly quite awful. A great deal of expertise and care is necessary to do the job right. If you have been misled into purchasing one of these inferior versions (for example, a Kindle edition), the publishers have told me that they will replace your copy with the PDF edition that I have personally approved. Do not purchase eTAOCP in Kindle format if you expect the mathematics to make sense. (The ePUB format may be just as bad; I really don't want to know, and I am really sorry that it was released.) Please do not tell me about errors that you find in a non-PDF eBook; such mistakes should be reported directly to the publisher.”

https://www-cs-faculty.stanford.edu/~knuth/taocp.html

Re:Preview in macOS Big Sur is destroying PDFs by omnimus on Wednesday December 16, 2020 @07:03PM (#25450510)
But thats such a specific example. Math books have so much complex notation and wierd inline elements... he had to invent TeX for that. HTML/CSS wouldn't handle it.

Basically for all normal texbooks you will want epub as digital format. And if you have lot of ilustrations or wierd format book then just get the printed version.

Re:Preview in macOS Big Sur is destroying PDFs by abrowne on Wednesday December 16, 2020 @08:57PM (#25451432)
I like PDFs for digital cookbooks as well.
Re:Preview in macOS Big Sur is destroying PDFs by ernst_klim on Wednesday December 16, 2020 @04:35PM (#25449067)
> I personally like to purchase books that are in PDF format, not epub/mobi

PDF is abysmal for books though. 1) You can't scale fonts to fit various screen sizes. 2) It's waaay more expensive to interpret and render, so it affects battery life.

Re:Preview in macOS Big Sur is destroying PDFs by systemvoltage on Wednesday December 16, 2020 @04:49PM (#25449242)
1) That's a feature, not a bug :)

2) Agreed, but that's a challenge for the engineers, not something we should blame the user for. Users have unequivocally spoken (Look up reviews for epub programming books on Amazon, usually they just want a PDF).

Re:Preview in macOS Big Sur is destroying PDFs by cratermoon on Wednesday December 16, 2020 @10:09PM (#25451960)
Not being able to scale the fonts for different resolutions is something only a young person with 20/20 vision would thinks is a feature.
Re:Preview in macOS Big Sur is destroying PDFs by systemvoltage on Thursday December 17, 2020 @12:09AM (#25452726)
You can zoom the whole thing.

Scaling fonts while keeping the width of the line the same causes other problems.

Re:Preview in macOS Big Sur is destroying PDFs by cjsawyer on Wednesday December 16, 2020 @04:38PM (#25449102)
And yet, I prefer it. Textbooks in any other format are miserable to read.
Re:Preview in macOS Big Sur is destroying PDFs by Ar-Curunir on Wednesday December 16, 2020 @04:46PM (#25449213)
Textbooks are different from other kinds of books in that you have formulae and figures that can't easily be reflowed.
Re:Preview in macOS Big Sur is destroying PDFs by sjy on Thursday December 17, 2020 @06:23AM (#25454566)
> It's waaay more expensive to interpret and render, so it affects battery life.

Interesting – I never noticed a difference in battery life when I was reading MOBIs and PDFs on my Kindle, but the slow refresh rate made scrolling through PDFs a nightmare. I do notice that reading PDFs on my iPad is very light on battery compared to reading web pages, but that’s because those web pages are running a bunch of JavaScript and using my internet connection, whereas with a PDF I download it once and then read it for hours.

Re:Preview in macOS Big Sur is destroying PDFs by jcelerier on Wednesday December 16, 2020 @03:53PM (#25448483)
> The way the original authors intended it to be, including fonts and all the things that go into making a document.

cries in random PDFs that end up being printed with letters spaced by 1 cm

Re:Preview in macOS Big Sur is destroying PDFs by cratermoon on Wednesday December 16, 2020 @10:03PM (#25451912)
What size and resolution is your eReader? I can read PDFs on my computers fine, the screen is large enough. On my eReader I can't both see a whole page and have the text large enough to read, even with my reading glasses. I end up zooming in to bring the text up to readable size and then I'm only seeing part of the page and have to scroll left/right/up/down to read a page.
Re:Preview in macOS Big Sur is destroying PDFs by smartbit on Wednesday December 16, 2020 @11:02PM (#25452304)
Scrolling left/right zoomed text can be prevented with Goodreader and these 2 simple steps

- with the crop function in Goodreader remove as much as possible margin left & right. This might cut text in the header/footer eg the page number. Optionally crop odd & even pages differently.

- turn the iPad landscape and with 2 fingers pinch to zoom the text until the margins snap to the sides of the screen. Now with a single finger scroll down to read the text from top to bottom. Flip to the next page by swiping with a single finger to the left and Goodreader will conveiniently start at the top of the next page.

In my experience for most portrait pages this enlarges the text big enough. As a bonus you can use the iPad Smart Cover as a stand in either position. I use this trick since the original iPad1 as Goodreader has been there since day 1.

Re:Preview in macOS Big Sur is destroying PDFs by adrianmonk on Wednesday December 16, 2020 @04:53PM (#25449298)
> absolutely DO NOT WANT - is web page like format with auto-flowing text

I would love it, though, if PDF included this as something that's always entirely optional.

Sometimes I want to read something just as formatted. If my display is big enough, and the formatting has any importance, I probably want that.

Other times, my screen is smaller (phone) or the wrong shape (small laptop), and I'd rather the text confirm to the device rather than vice versa.

Also, sometimes I use my arrow keys to scroll as I read to keep my place (like a line-oriented instead of page-oriented bookmark). So just because the device is capable of it, I don't necessarily always want page-oriented original formatting because it might have two-column text to deal with or top/bottom margins that serve no purpose for me.

Re:Preview in macOS Big Sur is destroying PDFs by Closi on Wednesday December 16, 2020 @04:57PM (#25449345)
> I would love it, though, if PDF included this as something that's always entirely optional.

To be fair that’s what they are working on, with Liquid Mode for PDFs in Adobe Reader. The plan is that it will automatically work for all PDFs using some sort of AI magic.

Re:Preview in macOS Big Sur is destroying PDFs by mongol on Wednesday December 16, 2020 @05:19PM (#25449573)
Yes but as I understand, that will be a feature of that reader application alone. And it does not exist on Linux
Re:Preview in macOS Big Sur is destroying PDFs by higerordermap on Thursday December 17, 2020 @07:48AM (#25455072)
> The way the original authors intended it to be, including fonts and all the things that go into making a document.

So that it's very very hard to read on mobile, or in a small width window.

> For example, I personally like to purchase books that are in PDF format, not epub/mobi

exactly the opposite. I want to be able to properly reflow it in a narrow window side by side with another tab on laptop, often for technological books.

Re:Preview in macOS Big Sur is destroying PDFs by ketamine__ on Wednesday December 16, 2020 @03:46PM (#25448377)
What device do you use to read PDF's?
Re:Preview in macOS Big Sur is destroying PDFs by gpm on Wednesday December 16, 2020 @03:49PM (#25448421)
I've really been enjoying a remarkable tablet since I got it a few weeks ago. Great for taking notes, great for reading pdf's (and scribbling on them - which is surprisingly useful!), terrible for literally anything else.
Re:Preview in macOS Big Sur is destroying PDFs by rsfinn on Wednesday December 16, 2020 @04:06PM (#25448659)
That does sound like a remarkable tablet. What's it called?

(...oh, now I get it: <https://remarkable.com/>)

Re:Preview in macOS Big Sur is destroying PDFs by pklausler on Wednesday December 16, 2020 @05:53PM (#25449884)
I love reMarkable 2 for note-taking, but the fact that internal links in PDFs cannot be traversed makes it a non-starter for me as a technical document reader.
Re:Preview in macOS Big Sur is destroying PDFs by krn on Wednesday December 16, 2020 @03:59PM (#25448558)
> terrible for literally anything else

I hope it will soon be the best e-reader on the market, thanks to KOReader[1].

[1] https://old.reddit.com/r/RemarkableTablet/comments/jsb3r7/ko...

Re:Preview in macOS Big Sur is destroying PDFs by gpm on Wednesday December 16, 2020 @04:02PM (#25448612)
Hopefully, but I don't like counting features before they exist.

A feature that does exist - and I maybe should have mentioned, is that one of my house mates finds it really useful for remote teaching, they screen share the remarkables screen to their students and use it as something like a blackboard.

Re:Preview in macOS Big Sur is destroying PDFs by ketamine__ on Thursday December 17, 2020 @08:29AM (#25455363)
Is it a good ebook reader if you're not a prolific note taker?
Re:Preview in macOS Big Sur is destroying PDFs by gpm on Thursday December 17, 2020 @11:30AM (#25457079)
It renders PDFs, let's you scale/move where on the screen the page is rendered, let's you flip through pages, let's you switch to a view of page thumbnails, let's you go to a page number, remembers the last page you were on.

If you expect more from your ebook reader than that, it is not just because of software.

As a sibling comment mentions that might be fixed soon. V1 had long since had support for third party apps. V2 is taking a bit of time (because controlling eink screens in weird) but will probably have third party apps support soon. At that point you will be able to use one of the well known open source ebook reading apps.

Edit: And to be clear, all the third party app support is unofficial, the help menu on the tablet includes the ssh password for root, everything past that is just reverse engineering (it's a pretty typical linux system apart from the display).

Re:Preview in macOS Big Sur is destroying PDFs by crazygringo on Wednesday December 16, 2020 @03:49PM (#25448413)
I personally use an iPad. It's amazing for it. Especially when you use the Apple Pencil to highlight text, make annotations like circles or question marks, etc.
Re:Preview in macOS Big Sur is destroying PDFs by lilactown on Wednesday December 16, 2020 @04:43PM (#25449170)
I struggled to find good software for this. Is there a specific app you recommend?
Re:Preview in macOS Big Sur is destroying PDFs by e_proxus on Thursday December 17, 2020 @12:57PM (#25458156)
I’ve been a very happy user of LiquidText [1]. You can load multiple PDFs/images/documents into a LiquidText project and annotate and cross reference. There’s a separate work space outside of the documents where you can store clippings and collect summaries.

It’s great for reading long standard documents and cross reference between them and supporting material like examples etc.

[1]: https://www.liquidtext.net/

Re:Preview in macOS Big Sur is destroying PDFs by crazygringo on Wednesday December 16, 2020 @07:32PM (#25450776)
I've gone back and forth between Apple Books and Acrobat Reader a lot.

Ultimately I currently use Books because I do a lot of multicolored highlighting which is far more consistent in Books, and because Books lets you set bookmarks (to go back and forth between main text and endnotes) which Acrobat inexplicably still does not support.

Ultimately every PDF app is good at some things and terrible at others, and you're just going to have to find the app that has the best set of features for you. It is pretty sad that all the apps have significant drawbacks for certain common workflows.

Re:Preview in macOS Big Sur is destroying PDFs by sjy on Thursday December 17, 2020 @06:34AM (#25454646)
I like GoodReader for this. It’s the only app I’ve found that stores my annotations in the PDF files themselves, and allows me to keep my PDF library in sync over SFTP, Dropbox, etc. so that I can read and annotate documents on non-Apple devices as well.
Re:Preview in macOS Big Sur is destroying PDFs by schaefer on Wednesday December 16, 2020 @06:12PM (#25450070)
On the iPad, I use goodnotes for that. You can import PDFs and then mark them up.
Re:Preview in macOS Big Sur is destroying PDFs by saagarjha on Wednesday December 16, 2020 @09:26PM (#25451637)
PDF Viewer has worked well for me, personally.
Re:Preview in macOS Big Sur is destroying PDFs by ghufran_syed on Thursday December 17, 2020 @01:37AM (#25453217)
I use notability on the 12.9 inch iPad Pro. You can import the pdf, then annotate
Re:Preview in macOS Big Sur is destroying PDFs by mhh__ on Wednesday December 16, 2020 @04:43PM (#25449175)
A computer.

I started off my "learning more than what you get taught in school" reading PDFs on a tiny phone, I now do it on a bigger phone, a big DPI monitor etc. none of these platforms makes a blind bit of difference to me because my eyes aren't the bottleneck.

Re:Preview in macOS Big Sur is destroying PDFs by cjsawyer on Wednesday December 16, 2020 @04:40PM (#25449128)
I use an ipad pro for reading pdf textbooks. The high refresh rate screen makes it more pleasant to use than the android tablets I’ve tried. Also the iOS books app is great, if a little bloated by the store half
Re:Preview in macOS Big Sur is destroying PDFs by systemvoltage on Wednesday December 16, 2020 @04:55PM (#25449314)
iPad Pro, 10”.
Re:Preview in macOS Big Sur is destroying PDFs by pklausler on Wednesday December 16, 2020 @05:50PM (#25449860)
Would you be happy with some kind of paginated image file format, if it were not significantly larger than PDF?
Re:Preview in macOS Big Sur is destroying PDFs by fomine3 on Wednesday December 16, 2020 @08:57PM (#25451427)
Oppositely what I absolutely WANT - is web page like format with auto-flowing text and something that fits to the screen with user styling/typesetting. I wish both option is available.
Re:Preview in macOS Big Sur is destroying PDFs by systemvoltage on Thursday December 17, 2020 @12:10AM (#25452728)
Markdown/Asciidocs/reStructured Text :)
Re:Preview in macOS Big Sur is destroying PDFs by fomine3 on Thursday December 17, 2020 @12:47AM (#25452947)
Yes, honestly HTML or its subset is enough for me but some author/publisher publishes only ePub or PDF.
Re:Preview in macOS Big Sur is destroying PDFs by hcurtiss on Wednesday December 16, 2020 @04:13PM (#25448772)
I agree completely. Have you found any good resources for acquiring books in pdf?
Re:Preview in macOS Big Sur is destroying PDFs by arthurcolle on Wednesday December 16, 2020 @04:14PM (#25448787)
LibGen, SciHub
Re:Preview in macOS Big Sur is destroying PDFs by izacus on Wednesday December 16, 2020 @04:15PM (#25448800)
> Why anyone treats PDF as anything but a write-once format is beyond me.

sigh These kind of ignorant statemens really annoy me.

The massive part of PDF spec is dedicated to editable features (annotations, form filling and digital signatures) which are used by massive industries daily because it brings them a lot of value. It's REALLY not that hard to think for a second and remember why having a single file which can be:

- Edited, annotated and commented

- Approved with explicit markers

- Digitally signed by auditors and reviewers with tamper protection

- Rendered on anything that has a semblance of interactive UI with graceful degradation

- Archived on any kind of file storage

is insanely useful and valuable for massive worldwide industries.

Re:Preview in macOS Big Sur is destroying PDFs by TwoBit on Wednesday December 16, 2020 @04:27PM (#25448941)
And yet PDF re-writing keeps getting screwed up. Probably because it really is a bad format for this, with the pages of docs notwithstanding.
Re:Preview in macOS Big Sur is destroying PDFs by izacus on Wednesday December 16, 2020 @05:44PM (#25449802)
Sure, PDF re-writing is one of very clear non-goals when you read the spec. It's designed to be generated, always consistent and then later annotated and marked up.

And that doesn't make it read-only. It just makes it not suitable for live text editing just like a PNG isn't suitable for collaborative image work.

Re:Preview in macOS Big Sur is destroying PDFs by theamk on Wednesday December 16, 2020 @11:07PM (#25452337)
Eh, "remove empty page" is not "live text editing". I have seen tools struggle with seemingly simple operations, like "take page 1,4 from A and pages 4,6 from B, scale to fit paper size and combine into one file". And those are not some exotic requirements, those are one of the most basic operations people want to do with multi-page documents.

Also, did you want to say JPEG isn't suitable for collaborative image work (because it's lossy?). As PNG is a pretty fine exchange format if two people, who prefer different graphical editors, want to work on the same document.

Re:Preview in macOS Big Sur is destroying PDFs by virgilp on Wednesday December 16, 2020 @05:03PM (#25449404)
I never saw these screw-ups in Acrobat, so maybe the problem is not the format, but Apple?
Re:Preview in macOS Big Sur is destroying PDFs by dkonofalski on Wednesday December 16, 2020 @05:26PM (#25449637)
Then you probably don't use Acrobat enough. PDF is a finicky mistress.
Re:Preview in macOS Big Sur is destroying PDFs by virgilp on Thursday December 17, 2020 @06:33AM (#25454637)
Maybe; but I do have the full suite. Have used it plenty during the pandemic to fill in forms digitally (some that were designed to be filled in digitally, others that were not), both on an iPad and on computers. Sure, I'm not a hardcore professional user but those wouldn't be using Preview anyway; I'd bet my family usage is consistently above average.

(also used it before the pandemic - I used to work for Adobe, for 10 years, though not in the Document Cloud group).

[edit] I should clarify that "I never personally experienced Acrobat bugs that would corrupt my document", not that they don't exist; am not claiming that Acrobat is flawless, and maybe if I went to dig into the bug tracker I could've found document corruption bugs too, who knows.

The format is certainly messy [+], I don't deny that. However, I think in this instance you're letting Apple off the hook too easily - this one is decidedly their screwup, not Adobe's.

[+] not the basics of it, that's fine; but the "trying to do too much" part.

Re:Preview in macOS Big Sur is destroying PDFs by dkonofalski on Thursday December 17, 2020 @01:21PM (#25458469)
I don't think I'm letting Apple off easy because I don't think it's not their fault. I just think that, until we see the document in question, we can't squarely say that it is their fault. Preview and Acrobat both have ways of dealing with junk/bogus data and I feel like that's what's going on here. There must have been some kind of bit switched when the document was "corrected" and it's possible that Acrobat and Preview just resolve that issue differently while both still outputting "valid" PDF files.
Re:Preview in macOS Big Sur is destroying PDFs by theamk on Wednesday December 16, 2020 @11:01PM (#25452303)
Sure, but the major text is still "write once" -- you can only add specially designated information to a read-only core.

As this article shows, a trivial operation on the core text, like "remove a blank page", is still very hard and pretty easy to get wrong.

I think having general Turing-complete power in a document format is a horrible idea. It's a pity we ended up with it. Something like OpenOffice's presentations ("odp") is also a single file which is layed out per page, and can be annotated, commented, approved, edited and so on, while not being Turing-complete.

Re:Preview in macOS Big Sur is destroying PDFs by Igelau on Wednesday December 16, 2020 @05:13PM (#25449499)
le sigh the surface changes you're talking about are small potatoes compared to removing a page and altering document structure without breaking anything.
Re:Preview in macOS Big Sur is destroying PDFs by izacus on Wednesday December 16, 2020 @05:41PM (#25449774)
I've worked on PDF editing library long enough to have a very good understanding how PDFs can break. And also good enough understanding why they're designed as they are - there are some rather forward thinking approaches the authors took in 1.0 and 1.2 spec standards.

Editing actual page contents is hard but the format itself wasn't designed with live editing in mind. Instead, they made a tradeoff to render the document consistently on all devices which has made the format so popular.

Re:Preview in macOS Big Sur is destroying PDFs by bigbubba on Wednesday December 16, 2020 @03:44PM (#25448331)
In many industries, writable PDFs are commonplace and aren't seen to be a problem because people in those industries don't see any problem with using Acrobat. If you want to unseat Acrobat and PDF, I think you'll have to provide something that has equivalent or greater power.

As for multi-image container formats, I think we already have that: cbz/cbr. Just a zip or rar archive with images in it, to be displayed in order by name. This 'format' is in common use already for scans of comic books. There are numerous viewers you can use to open and browse these files. Something to consider though; accessibility. A screen reader needs to use OCR to read these files to people with impaired vision. PDF files aren't fantastic for screen readers either, but they're much better than just a JPEG. I'd love to see some sort of subtitle system for images (I think mpv could probably overlay a subtitle sidecar on a still image, but that's not widely supported. Text-based subtitles formats are easy to wire into text to speech though.)

Re:Preview in macOS Big Sur is destroying PDFs by gfody on Wednesday December 16, 2020 @04:04PM (#25448633)
you can also embed images and fonts in svg, probably not as reliable as pdf for pixel-perfect reproductions everywhere though
Re:Preview in macOS Big Sur is destroying PDFs by bigbubba on Wednesday December 16, 2020 @04:19PM (#25448832)
Is there any way to embed raster graphics into an svg? If so, maybe svg could be used as a text-capable container for raster images.
Re:Preview in macOS Big Sur is destroying PDFs by unilynx on Wednesday December 16, 2020 @04:30PM (#25448982)
Yep, they can, at least JPEG and PNG.

(and if you're not precise enough with your questions, some designers will simply send you a PNG-base64-blob-inside-SVG if you ask them "can we have a SVG version of that icon")

Re:Preview in macOS Big Sur is destroying PDFs by gedy on Wednesday December 16, 2020 @04:26PM (#25448924)
Sure, data urls in image tag. (Not sure how practical that is for file size)
Re:Preview in macOS Big Sur is destroying PDFs by monocasa on Wednesday December 16, 2020 @03:47PM (#25448381)
The comic book piracy community in fact does have what you're asking for. The formats .cbz, .cbr, etc. are just zip and rar files respectively, with images inside and a standard format for the internal filenames so they're presented in order by your reader.

Would love something like that with svg allowed inside to support vector drawings.

Re:Preview in macOS Big Sur is destroying PDFs by ASalazarMX on Wednesday December 16, 2020 @04:48PM (#25449227)
And this has become the de facto open standard, supported by many document viewers, probably because it's a very straightforward combination of two widely used tools.
Re:Preview in macOS Big Sur is destroying PDFs by yarcob on Wednesday December 16, 2020 @05:07PM (#25449443)
Basic PDF editing (adding, removing, reordering, cropping and rotating) has been rock solid in Apple's Preview app. It's something that I dearly miss when I'm on Windows.

Which makes showstopper bugs like this a very unfortunate.

But then again, it's been common knowledge that you shouldn't upgrade to a .0 release...

Re:Preview in macOS Big Sur is destroying PDFs by helmholtz on Wednesday December 16, 2020 @06:16PM (#25450112)
I'm not sure how widely you've sampled the field on Windows, but in case you don't know it, I can recommend PDF-Xchange Editor. They forced it upon us at my workplace and it seemed dodgy as hell at first. But I've been using it steadily and now I really like it. I'm a paper-free researcher so I no longer print research papers. Instead, I annotate/highlight/comment using this software, and it's worked so well that I've installed it on my personal machine as well.

I've tried all of the commands you've mentioned, and so far it's worked without a hitch.

Re:Preview in macOS Big Sur is destroying PDFs by yarcob on Thursday December 17, 2020 @03:54AM (#25453831)
Thanks for the hint, I'll check it out!
Re:Preview in macOS Big Sur is destroying PDFs by crazygringo on Wednesday December 16, 2020 @03:48PM (#25448399)
Because you often have no choice.

You have a PDF of a book and you need to export the pages of a single chapter to a new PDF.

Or you have 30 different PDF's that you need to combine into a single one.

Or a full-color large-filesize scanned PDF that you need to convert to a smaller-sized black-and-white one.

Or you need to copy quotes from a PDF to paste somewhere else.

I could go on... PDF's are documents, and normal workflows involve all sorts of conversion and rearrangement and processing of documents. That's the whole point.

Re:Preview in macOS Big Sur is destroying PDFs by _-david-_ on Wednesday December 16, 2020 @03:53PM (#25448478)
None of those require modifying the existing document. A new document could be produced and the existing document(s) would only be read from.
Re:Preview in macOS Big Sur is destroying PDFs by crazygringo on Wednesday December 16, 2020 @04:04PM (#25448635)
Oh. Well, I mean... sometimes it's just easier to "Save" rather than "Save As"? (Or on macOS now, "Save" rather than "Duplicate" then "Save".)

It's supposed to be a valid assumption that re-saving a lossless document in its native format won't destroy parts you haven't touched.

Re:Preview in macOS Big Sur is destroying PDFs by richard_todd on Wednesday December 16, 2020 @05:01PM (#25449381)
There are lots of image-container formats. DjVu is my favorite, and supports OCR text annotations also. But, outside of some niches, it has fallen out of use these days. Adobe closed the quality gap by adding jbig2 and jpeg2000 support to PDF, making it possible to build a "bunch of images" PDF with similar quality to DjVu.
Re:Preview in macOS Big Sur is destroying PDFs by Yetanfou on Thursday December 17, 2020 @03:55PM (#25460287)
Strangely enough (?) I have not had many problems with PDF, certainly no more than with other document formats. I often use tools like pdftk [0] (as found on many Linux distributions) to split sections out of PDFs, create new ones out of single-page PDFs created with ImageMagick, create odd-even page versions etc. I generally do not touch the more "advanced features" like embedded JS (which I have disabled in all readers which support it), I just use it as a document format which more or less guarantees the resulting document looks the way it was meant to, plus or minus a few fonts. For that purpose it works works well enough.

The "bunch of jpgs/pngs/pick your poison in a tar container" format you describe exists in a fashion: Comic Book Archive, a format meant for and mostly used for comics. It consists of a compressed archive which contains sequentially numbered "pages" which can be JPEG, PNG or other image file formats. For pure image documents it can be used as a replacement for PDF but since it does not support text it can not be used for scanned OCR'ed documents. DjVu [2] does support a text layer but that comes at the cost of complexity, it is far from the simple container you propose. Since an OCR'ed text layer needs to save not only the text itself but also the location on the image for each character I don't see any way to avoid complexity here.

[0] https://www.pdflabs.com/tools/pdftk-server/

[1] https://en.wikipedia.org/wiki/Comic_book_archive

[2] https://en.wikipedia.org/wiki/DjVu

Re:Preview in macOS Big Sur is destroying PDFs by sildur on Wednesday December 16, 2020 @04:03PM (#25448629)
Blind and shortsighted people may not like your idea. There are accessibility options in PDF, but even a regular one can be accessed with a screen reader. Your images won't.
Re:Preview in macOS Big Sur is destroying PDFs by bigbubba on Wednesday December 16, 2020 @04:24PM (#25448899)
It's also generally a pain in the ass for people with good vision too, since text can't be copied out of a JPEG. If you want to forward a paragraph of text from a pure raster document, you have to read and type it all out yourself.
Re:Preview in macOS Big Sur is destroying PDFs by fomine3 on Wednesday December 16, 2020 @09:23PM (#25451616)
It's also blocker for machine translation.
Re:Preview in macOS Big Sur is destroying PDFs by theamk on Wednesday December 16, 2020 @11:09PM (#25452356)
It's not like PDF is the only one with text layer, or the only options are PDF, JPG or PNG.

DjVU can have text layers as well, and I think SVG too?

Re:Preview in macOS Big Sur is destroying PDFs by qwerty456127 on Wednesday December 16, 2020 @06:55PM (#25450435)
> Why anyone treats PDF as anything but a write-once format is beyond me.

Because PDF is supposed to be like electronic paper and you normally can draw on a paper original.

In an ideal world OSes and apps would be better equipped to separate data and metadata and work with multi-stream files. Every file would have different kinds of pure data (e.g. scanned picture and OCRed text), metadata (e.g. title, author, ISBN/etc IDs, ToC etc) and user-generated annotations in separate streams. But our actual world is not ideal, we mix everything into one stream for every document and allow the apps modify it every time we view it.

Re:Preview in macOS Big Sur is destroying PDFs by eddieh on Wednesday December 16, 2020 @04:56PM (#25449336)
We have that container format. It is called: TIFF
Re:Preview in macOS Big Sur is destroying PDFs by ruined on Wednesday December 16, 2020 @04:00PM (#25448574)
There already exist formats as you describe, but regardless, a change of format wouldn't fix anything. The same problem would just surface there, as Preview and whatever add support for those formats, and include editing features.

If you don't want to break something, just don't try to edit it. That can't be enforced anywhere but at the individual user level.

Even proprietary formats in first-party software have this problem. Hell, plain-text editors have this problem.

Re:Preview in macOS Big Sur is destroying PDFs by pm215 on Wednesday December 16, 2020 @05:18PM (#25449551)
It would help if Preview wasn't really keen on editing the document, though. I find it tries to modify PDFs quite often -- I think it happens if I accidentally click on a table as I scroll through the document. I have resorted to 'chmod 0444 *.pdf' on my folder of datasheets and manuals so it can't mess with what I want to be a read-only file. Preview is the only pdf viewer I've ever needed to do that for.

I've never wanted to edit a PDF, so personally I'd rather the feature was gated behind a menu option or something so you had to deliberately ask for it.

Re:Preview in macOS Big Sur is destroying PDFs by jrochkind1 on Wednesday December 16, 2020 @04:07PM (#25448670)
Making a PDF include OCR'd text seems to by definition require writing twice. It has to be edited to add the OCR'd text that was not in the original image-only PDF, no?

I mean, you can say that the second PDF is a different PDF that has only been written once, but you can say that about literally any edit, "write once" no longer means anything if you think about it that way.

Re:Preview in macOS Big Sur is destroying PDFs by aardvark179 on Wednesday December 16, 2020 @04:17PM (#25448820)
You can do the OCRing as a part of the original scanning process. You define a blank font and place the letters at the appropriate points to allow text selection. This is also done for documents that use fonts which are not licensed for embedding, it reduces on screen rendering quality slightly as you have lost any hinting information but it’s fine with printing and reserves the intent.
Re:Preview in macOS Big Sur is destroying PDFs by tonyedgecombe on Wednesday December 16, 2020 @04:21PM (#25448860)
PDF does support appending to the file and it’s not just for adding pages. You can make changes throughout the original document.

I’m not sure that is what Preview does though.

Re:Preview in macOS Big Sur is destroying PDFs by idle_zealot on Wednesday December 16, 2020 @08:20PM (#25451147)
> I think we need a multi-image container format. It could be something that's literally a bunch of jpgs/pngs/pick your poison in a tar container

You've just described the .cbt format!

https://en.m.wikipedia.org/wiki/Comic_book_archive

Re:Preview in macOS Big Sur is destroying PDFs by marcan_42 on Wednesday December 16, 2020 @11:24PM (#25452438)
And it's a bad format, because .tar does not have an index that allows random access. It also does not have compression, unless you stick it in gzip, which makes it even worse because then you can't even skip entries, you have to decompress the whole thing from the top.

.zip is better, at least that has an index, but at the end of the file, so it's not linearly streamable.

For what it's worth, .pdf is structurally ~the same as .zip; the index is at the end, and blocks are compressed individually.

Choice of archive format matters :-)

Re:Preview in macOS Big Sur is destroying PDFs by Freak_NL on Thursday December 17, 2020 @06:14AM (#25454513)
Most comics using this meta-format seem to use .cbr (Rar) or .cbz (Zip). The main benefit is that reader software understands the intended use of these archives, and you can link a comic book reader to these file extensions.
Re:Preview in macOS Big Sur is destroying PDFs by nine_k on Wednesday December 16, 2020 @04:30PM (#25448989)
PDF is often called "electronic paper", meaning its primary use, typesetting documents on screen and paper alike.

I'd rather view that PDF is an electronic clay tablet. You can put any text or image on it, but once it's formed, you better not try to alter it, lest you break it.

Re:Preview in macOS Big Sur is destroying PDFs by m463 on Wednesday December 16, 2020 @08:16PM (#25451124)
What annoys me is that there are some .pdf manuals I want to refer to, and when I view them in preview and go to quit it asks if I want to keep my changes or revert them.

WTF? why does viewing a manual - and I only used navigation like page up / page down - cause modifications?

Re:Preview in macOS Big Sur is destroying PDFs by soraminazuki on Wednesday December 16, 2020 @11:55PM (#25452633)
You've likely created a text box by double clicking on the document.
Re:Preview in macOS Big Sur is destroying PDFs by ernst_klim on Wednesday December 16, 2020 @04:44PM (#25449184)
> Why anyone treats PDF as anything but a write-once format is beyond me.

Hahaha. Quite a lot of people around me think that PDF is a collection of JPEGs glued together (because they mostly see PDF as scanned non-OCRed docs).

Re:Preview in macOS Big Sur is destroying PDFs by thordenmark on Wednesday December 16, 2020 @04:13PM (#25448773)
"Why anyone treats PDF as anything but a write-once format is beyond me."

Some of use work in print publishing and being able to edit PDF's is critical.

Re:Preview in macOS Big Sur is destroying PDFs by SoSoRoCoCo on Wednesday December 16, 2020 @04:17PM (#25448813)
Here's is one good reason: My company uses digital certificate signing on PDF. It is a very common usage. We have yet to migrate to DocuSign.
Re:Preview in macOS Big Sur is destroying PDFs by cmiller1 on Wednesday December 16, 2020 @10:43PM (#25452186)
> The only programs I'd be reasonable sure wouldn't screw it up are Acrobat itself

Oh no, I've seen acrobat screw with it too

Re:Preview in macOS Big Sur is destroying PDFs by db48x on Wednesday December 16, 2020 @03:45PM (#25448364)
There are already a handful of multi-image container formats. They're all images inside zipfiles, of course.
Re:Preview in macOS Big Sur is destroying PDFs by Siira on Thursday December 17, 2020 @06:53AM (#25454739)
We already have CBR/CBZ.
Re:Preview in macOS Big Sur is destroying PDFs by christkv on Wednesday December 16, 2020 @04:39PM (#25449116)
CBR and CBZ for comics fits this I think?
Re:Preview in macOS Big Sur is destroying PDFs by CamperBob2 on Wednesday December 16, 2020 @09:33PM (#25451689)
.PDF works just fine. Don't blame the shortcomings of crappy software implementations on the format itself.

We need a format that will still be readable 100 years or more from now, and .PDF serves that purpose.