Overview PDF (Portable Document Format) stands out for it's ability to preserve formatting across different devices and platforms. Whether for business reports, academic papers, or e-books, PDF has become a de-facto standard of document sharing in today's world. Python, a versatile and robust programming language, offers a suite of...
PhantomJS is used to emulate browsers through command line, for generating PDFs, web page manipulation, headless testing and much more interesting stuff. Npm provides us a module called "node-phantom" which helps us to use PhantomJS in our NodeJS application in a non-fussy way. A prerequisite for using this module is, you must have...
We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around this, we...
We have a setup where a backend thread, fired by the Spring Events, does some processing, generates a PDF and emails the result to the user. The code we were using to generate the HTML from a GSP to be converted to a PDF using iText was as follows : [java] def webRequest = RequestContextHolder.getRequestAttributes() ...
We had a requirement that a template PDF which had Acroform fields had to be pre-populated (like name, email id etc) and sent to the end user so that he/she only needed to fill in the details which were expected to be filled by him/her. After going through the iText library, we found that the PdfStamper class was the best way to go...
In one of our grails project , we had to attach cover to Pdf file . But since some of pdf's uploaded were password protected. To handle this scenario we added bouncyCastle.jar , so our version of iText was able to handle password protected pdf . And Then to check whether pdf is password protected or not , we used "Boolean...
Recently, we had a requirement where secure URLs were to be made accessible to Google. Our implementation was to send a url with token valid for 10 seconds. The token expired automatically after 10 seconds. We used time based cache for this as described here: T set max time to 10 seconds , I set default MaxAge to 10 millis in above...