Cursed TIL of the day: PDF is a vector image format, so you can convert a PDF to SVG with pdf2svg
Conversation
Notices
-
Xe :verified: (cadey@pony.social)'s status on Wednesday, 03-Apr-2024 03:19:52 JST Xe :verified: -
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 03-Apr-2024 03:19:45 JST Foone🏳️⚧️ @cadey did I ever tell you about that joke tool we deployed in production at the US government that could turn TIFF files into PDFs, without loading them up as images? It just rewrote the headers!
-
𝚝𝚓𝚠 (thomasjwebb@mastodon.social)'s status on Wednesday, 03-Apr-2024 04:05:53 JST 𝚝𝚓𝚠 @foone @cadey If you told me that some software could open those anyway because of a weird quirk in the pdf specification, I'd have no choice but to believe you.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 03-Apr-2024 04:05:53 JST Foone🏳️⚧️ @thomasjwebb @cadey oh its worse than that: they're completely valid pdf files.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 03-Apr-2024 04:14:02 JST Foone🏳️⚧️ @thomasjwebb @cadey it's because TIFF supports, among a bunch of other formats, group-4 fax encoding, a black & white image format.
PDF supports a bunch of image formats, including... group-4 fax encoding. -
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 03-Apr-2024 04:16:42 JST Foone🏳️⚧️ @thomasjwebb @cadey so the program just parsed the TIFF to get the size out, then grabbed the binary blob of the g4-encoded image. Then it output a PDF header with that size and a bit of postscript code that says "here comes a g4-encoded image" and then it pastes in the blob. Done. your TIFF is now a PDF.
-