Making a PDF that's larger than Germany
21–30 of 156 posts
Re: Making a PDF that's larger than Germany
#22Re: Making a PDF that's larger than Germany
#23It seems germane at this point to paraphrase Steven Wright. “I have a map of the United States. It’s actual size. “
Re: Making a PDF that's larger than Germany
#24Earlier quoted context omitted.
Is the xref at the end of a PDF required or not? Seems like it is in the spec.
By the spec, yes. Some PDF readers will parse it anyway, some will not. In my experience depending on the renderer the xref table can be varying degrees of malformed before things go wrong. Edge's old PDF reader (the one before Acrobat and after PDFium) for example seemed to tolerate just about anything, falling back to the latest version of objects if the xref table was broken. There's also other mistakes you can ma…
So CR/LF, space/LF, and space/CR are all valid endings.
Re: Making a PDF that's larger than Germany
#25Re: Making a PDF that's larger than Germany
#26Earlier quoted context omitted.
It also screams buffer overflow.
PDF readers are probably mostly pretty hardened against "naive" non-conforming content.
Quite possibly perhaps that might be true-ish to some extent, I think, but take that with a grain of salt, I'm not an expert, that's just my wild guess :-p
Re: Making a PDF that's larger than Germany
#27Screenshot of Preview’s Document inspector, showing the page size of 352777777777.78 x 10.59 cm. If you’re curious, that width is approximately the distance between the Earth and the Moon. I’d have to get my ruler to check, but I’m pretty sure that’s larger than Germany.”
The size of every planet in our solar system, put next to each other, can fit in this doc with room to spare
Re: Making a PDF that's larger than Germany
#28Earlier quoted context omitted.
By the spec, yes. Some PDF readers will parse it anyway, some will not. In my experience depending on the renderer the xref table can be varying degrees of malformed before things go wrong. Edge's old PDF reader (the one before Acrobat and after PDFium) for example seemed to tolerate just about anything, falling back to the latest version of objects if the xref table was broken. There's also other mistakes you can ma…
As I understand it, the xref entries don’t require a carriage return, but they require a fixed line length. If you don’t want to use a CR, you can pad with a space. So CR/LF, space/LF, and space/CR are all valid endings.
> The byte offset in the decoded stream shall be a 10-digit number, padded with leading zeros if necessary, giving the number of bytes from the beginning of the file to the beginning of the object. It shall be separated from the generation number by a single SPACE. The generation number shall be a 5-digit number, also padded with leading zeros if necessary. Following the generation number shall be a single SPACE, the keyword n, and a 2-character end-of-line sequence consisting of one of the following: SP CR, SP LF, or CR LF. Thus, the overall length of the entry shall always be exactly 20 bytes
This is interesting. Never actually saw anything other than CRLF in practice, even inside of PDF files that otherwise were LF-only.
[1]: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandard... page 41
Re: Making a PDF that's larger than Germany
#29Sounds 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.