3 ms·
Once upon a time I had to track down an issue where very rarely, with no discernible pattern the web app would produce garbled PDFs. We would restart all server
by romanhn 2y ago
Once upon a time I had to track down an issue where very rarely, with no discernible pattern the web app would produce garbled PDFs. We would restart all servers, everything would be fine for a month or two, then random bad output. Turned out this happened when an admin account remotely connected to an app server, which caused a reset of default screen resolution (only for admin accounts, not regular remote connections), which messed up the PDF library that relied on a specific resolution (it was HTML-to-PDF conversion). Lived with it for a couple of years at least before tracking down the root cause (after many many failed attempts). The fact that only the server with the reset resolution caused the problem confounded the issue.
- crazygringo 2y agoOh man, PDF generators are like the least deterministic thing ever coded. I don't know if they somehow depend on external video drivers or printer drivers or font engines or what. But what you're describing sounds exactly par for the course to me. There were a couple of years when everything I printed to PDF on my Mac looked right, but if you selected the text and copied and pasted it, it was gibberish, because it inexplicably shuffled all the character codepoints.
- jimbobthrowawy 2y ago> it was gibberish, because it inexplicably shuffled all the character codepoints. I forget what they called it, but that was a feature touted by Adobe and others a few years ago as a sort of pseudo-DRM. I have encountered many pdfs like that years ago, and think many pdf readers nowadays have features to undo the text scrambling.
- crazygringo 2y agoYeah, I'm aware something like that has been a feature. But this was just printing from Chrome and using the macOS built-in Save to PDF in the printer dialog. This was a straight-up bug which I filed with Chromium but there was nothing they could do because it was a bug in macOS. It did finally get fixed after a couple of years by Apple.