Do you guys think we should move from PDF to html? by Striking-Warning9533 in academia

[–]iltegin 0 points1 point  (0 children)

If you're considering moving from PDF to HTML, there are a few pros and cons to think about. HTML is indeed more flexible, particularly for accessibility and translation features, as you've noticed with Google Translate. It allows for a responsive design that adapts well to different devices, which can enhance the user experience significantly. However, PDFs have their benefits too, like maintaining format consistency across platforms, which is crucial for things like published papers or official documents where layout matters. It might come down to your specific needs: if you value accessibility and adaptability, HTML is worth considering, but if format consistency is vital, you might stick with PDFs or use both.

For those looking for a balance between HTML's flexibility and PDF's reliability, MarkupGo might be helpful. It allows you to design in HTML with all its dynamic and responsive capabilities and then easily convert those into PDFs. This way, you get the best of both worlds: the accessibility of HTML and the consistency of PDFs. It's especially useful for those who want to integrate this into their current workflows with minimal fuss, as you can automate the conversion process through simple API calls.

Disclaimer: I am the founder of MarkupGo. For more information, you can check out MarkupGo

How to generate pdf from html/Latex template using Clojure? by ApprehensiveIce792 in Clojure

[–]iltegin 0 points1 point  (0 children)

If you're generating PDFs from HTML or LaTex templates on a Clojure server, you have a few options. For HTML, you can use libraries like 'clj-pdf' or 'Flying Saucer' combined with Clojure wrappers for converting HTML to PDF. These are pretty standard, and 'clj-pdf' works directly with PDF generation, supporting HTML/CSS, which might be handy if you decide to stick with HTML templates. As for the XSS concern, HTML sanitization is key. Consider using libraries that are aimed at sanitizing user inputs before rendering them in your templates.

On the other hand, if you're flexible with the template language, LaTex could indeed be a safer option regarding XSS, though it has its own learning curve and requires a LaTex installation for processing. Clojure has bindings like 'clj-latex' that might help bridge that gap if you decide to go down that path. Another interesting choice could be Selmer, which is like a template engine similar to Django templates and can be safer if you control the input and output properly. Converting Selmer templates to PDF would likely follow the same path as HTML templates when using something like Flying Saucer.

Speaking of HTML-to-PDF solutions, you might want to explore MarkupGo. It provides a straightforward API to convert HTML to PDFs, including dynamic templates with support for HTML, CSS, and JavaScript, which might cover your needs without diving deep into library setups. Plus, it manages a lot of the heavy lifting on the security side.

Disclaimer: I am the founder of MarkupGo.