News for hackers. Stuff that matters.
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.