5 ms·
Since everything is offline, what ended up being the hardest format to support while keeping rendering faithful?
by Mobeen0119 2mo ago
Since everything is offline, what ended up being the hardest format to support while keeping rendering faithful?
- vrighter 2mo agoWhy would rendering a document need internet access?
- Chilinot 2mo agoPDFs can do all sorts of shenanigans, such as bundle executable javascript that runs when the file is opened.
- echoangle 2mo agoYou don’t need internet to run JS though. And the JS seems to be pretty sandboxed in normal viewers too, so a pdf file shouldn’t make network requests on its own. As long as there is no iframe-like content I don’t see how rendering a document would ever need network.
- vrighter 2mo agoif that document really does need internet access to be rendered (unlikely) then it can use the internet connection one would have used to upload the file in the first place.
- chrisjj 2mo agoApart from exfiltration, no reason at all.
- mokshablr 2mo agopptx by a mile. A slide is absolutely positioned shapes with a whole layout inheritance thing going on so the JS renderer ends up reimplementing a whole layout engine, and it gets you to "approximately right" and stops there. Charts I gave up on. docx was annoying in a different way. Bullets came out as junk characters for a while and I couldnt work out why. I then found that Word writes them as private use area codepoints in the Symbol font so unless you have that exact font you get some junk. I just map them back to unicode after the render. xlsx was the easy one, SheetJS does the hard part. On faithful though none of this is faithful the way LibreOffice is. Its more that "you can read the document and it looks roughly right" which is what I wanted out of an app of 14MB.