>adding a [export to pdf] function to my web app bloats the size from 75kB to 3MB and requires a build step instead of just uploading the index.html to cloudfare
>>109083057@grok explain
>>109083057>adding a [export to pdf] functionyou realize all OSes can export to PDF on the print screen, right?
>>109083057Build it once and use the output like it's a 3rd party lib.Lazy load it from your app only when user uses the function.No build step for your app, only for that specific lib.No bloat, additional shit loads on demand.If you can't figure this out, what the fuck are you doing in software dev? Let me guess, you use typescript, react and two dozen npm packages you never seen the source code of?
>>109083468i found a simpler solution.the app just displays the file as a css formatted text file in the browser and the user just uses their browser's print to pdf functionand no, i specifically prompted claude to remove all bloat, and only use html, css, and plain ol' javascript in a single index.html file. a complete web app, only 75kB in size, only a single file. simple minimalistbloat-free.
>>109083502Can Android OS do "print to PDF", can iOS and iPadOS do that as well?
>>109083502>only 75kB in sizeRESPECT+
>>109083553yes? chrome for android has a print to pdf function.
>>109083614Oh shit, I'd never know, don't use chrome.
>>109083666firefox has it too? i thought every browser has this feature
Rewrite it in rust
>>109083459no, print screen just makes a jpg of it?
>>109084226No, you can print to PDF.
>>109083057window.print();
window.print();