5 ms·
> In addition we seem to be grabbing the PDFs from the server, converting to Base64 and then rendering as an object in the react app (rather than just linking t
by tacostakohashi 5y ago
> In addition we seem to be grabbing the PDFs from the server, converting to Base64 and then rendering as an object in the react app (rather than just linking to the pdf file directly).
> What benefit do we get from this complexity compared to just having static HTML pages that someone would update manually?
In the good old days, HTML was simple because it was just text + <h1>, <p>, <b>, etc markup and HTML forms, and web authors were ok / expected that the web browser would do the heavy lifting and render it appropriately for the client OS using native toolkits / widgets.
These days, the publisher wants 100% control over everything, so all that rendering / toolkit that was previously left to the browser is re-invented in JS.
Ask your superiors why you need to embed a PDF viewer in your page instead of just linking the to PDFs and letting the client open it in their local browser / Acrobat / PDF-viewer of choice. They'll probably mumble something about a consistent experience, what if the user doesn't have acrobat installed, etc.
- david927 5y agoYou can use SVG which gives you "100% control over everything" and still is composed/rendered using the browser. Anything you see in a PDF can be done with SVG. Yet no one does. Why not?
- yongjik 5y agoThat doesn't sound fair: PDF is ubiquitous. Organizations easily have thousands (maybe even millions) of PDF files lying around, and you can't just convert them to SVG and expect them to render faithfully.
- readonthegoapp 5y agoYou can't? They don't? Just curious. Never tried it, never thought to try it. But PDF is trash. Everybody loves their PDFs. I presume people use PDFs primarily to hide information while still keeping it strictly/ostensibly public.
- greazy 5y agoPdf is great. There's a reason why it hasn't been replaced as the go to format for digital forms and universal printing. It works well.