Live data from Hacker News

Making a PDF that's larger than Germany

alexwlchan.net

121–130 of 156 posts

Re: Making a PDF that's larger than Germany

#121
post #29

>Please don’t try to print it. Sounds like a print bomb waiting to happen. Last time I had a printer it was next to impossible to cancel a print job on Windows. Back when people had wifi printers that were open or ill-secured, those were fun times.

> it was next to impossible to cancel a print job on Windows It's still impossible. The only reliable method I've found consists of turning the printer off and then deleting the print job in the queue. Only way to get Windows to actually delete it. Doesn't work unless the printer is sitting right next to me, of course. I have no idea why this is so hard.

Some ~12 years ago, I was debugging POS integration with a receipt printer and accidentally sent garbage postscript to the receipt printer, which printed it out verbatim.

Stopping it was impossible. Power cycling that printer had absolutely no effect. It wrote the unfinished print job to some kind of persistent memory, and by god it was going to finish it.

It went through something like 2 1/2 rolls of receipt paper (yes it dutifully awaited the new rolls and then just continued) and due to the thermal printing process it smelled very odd, and I had quite a few metres of raw Postscript afterwards to decorate a wall with.

Re: Making a PDF that's larger than Germany

#122
post #98

Earlier quoted context omitted.

Yeah but the javascript can only do things inside the pdf.

What javascript can escape my browser, (edit: or an HTML page) for example?

Are the non-browser PDF readers more vulnerable? Do most even execute the Javascript?

Re: Making a PDF that's larger than Germany

#123

Earlier quoted context omitted.

“ PDF is a fabulous format” I will never forgive the pain PDF caused me when I worked on a project to parse millions of PDF files from various sources. Just reconstructing paragraphs was a huge effort not even mentioning parsing tables. I think we should do better for something that’s basically a standard. PDF manuals also suck big time.

PDF is supposed to a be a printer format, not a word processing document format. While I too would love to nail down a PDF subset to be a standard (for example requiring the accessibility tags that make text extraction easy) perhaps trying to create a hybrid format, one that satisfies both printers and resizable windows, is already an impossible goal. (I've always had to keep my love of PDF a secret from fellow nerds…

I wonder a bit if we wouldn't have a easier time extracting data, resizing pages etc if we sent HTML files instead of PDF. Are even half of PDFs printed at all?

Re: Making a PDF that's larger than Germany

#124

Reminds me of this PDF I created more than a decade ago from a Postscript implementation of the game of life. Seems it still works, but causes MacOS preview to crash. https://andrewcutler.net/docs/joke/life.pdf

It doesn't cause Preview to crash on Sonoma. FWIW, I can't see any animation, just the final state, while Firefox's PDF reader does show some animation. Skim has the same behaviour as Preview but doesn't show the grid.

Re: Making a PDF that's larger than Germany

#125
post #92
post #68

PDF is a fabulous format. I mean, it’s an awful format in so many ways, technically speaking, but the net effect of having a self-contained static file in your custody stands in blissful contrast to the user-hostile dynamic/SaaS website that can be taken away at a moment’s notice. PDF/A is the true PDF - it strips out most of the dangerous cruft. Anyway, if you like weird PDF hijinks, here’s a polyglot PDF/A CSV file…

PDF is an executable file. Many people are worried about running Javascript but still use PDF files without problems.

Is it really executable on the OS? Doesn't it require a native application to run it on an OS?

Re: Making a PDF that's larger than Germany

#126
post #110
post #98

Earlier quoted context omitted.

What javascript can escape my browser, (edit: or an HTML page) for example?

XMLHttpRequest to send anything the site knows anywhere. And row hammer, to breach the sandbox. https://en.wikipedia.org/wiki/Row_hammer

Row hammer is an exploit. It wasn't "by design".

While that may technically be "escaping the sandbox" it's a different case, because it was never meant to work, will be fixed and often is fixed.

Re: Making a PDF that's larger than Germany

#127

It seems germane at this point to paraphrase Steven Wright. “I have a map of the United States. It’s actual size. “

I always liked his related joke: "I want to get a tattoo of myself on my entire body only 2" taller.".

https://scomedy.com/quotes/10779

Re: Making a PDF that's larger than Germany

#129
post #92
post #68

PDF is a fabulous format. I mean, it’s an awful format in so many ways, technically speaking, but the net effect of having a self-contained static file in your custody stands in blissful contrast to the user-hostile dynamic/SaaS website that can be taken away at a moment’s notice. PDF/A is the true PDF - it strips out most of the dangerous cruft. Anyway, if you like weird PDF hijinks, here’s a polyglot PDF/A CSV file…

PDF is an executable file. Many people are worried about running Javascript but still use PDF files without problems.

When I ordered an official PDF copy of my college diploma, the order form had an option to enable "tracking" in the PDF file. Sure enough, when the recipient opened the PDF file (and when I tried it myself on a different machine), I got a notification from the company that generated the PDF...
Post reply on HN