Posts

Showing posts with the label pdf-generation

Add image in header using html-pdf node module

Image
Add image in header using html-pdf node module I am using this to convert the html to PDF.The conversions are really good.But the problem is to add header and footer in the PDF pages.In the options if i add the header text i got the result what i expected. //Options var options = { "header": { "height": "45mm", "contents": " Author: Marc Bachmann " // If i add image in content it wont work // sample i tried }, "footer": { "height": "28mm", "contents": "<span style='color: #444;'>{{page}}</span>/<span>{{pages}}</span>" } } // Tried this in contents <img src="image path" /> var result = HTML CONTENT '; pdf.create(result, options).toFile(fileName + ".pdf", function(err, res) { if (err) { console.error(err); callback(); }...

Rework Adobe Javascript code to use array

Rework Adobe Javascript code to use array Need to know how to modify Javascript to use array instead of single variable in Adobe Acrobat. Instead of a single string, I want to be able to use a TXT or CSV file, and extract all the strings stored in that TXT or CSV file. I think this means storing results in arrays, but I use SQL on a daily basis, not Javascript. // Iterates over all pages and find a given string and extracts all // pages on which that string is found to a new file. var pageArray = ; var stringToSearchFor = "Total"; for (var p = 0; p < this.numPages; p++) { // iterate over all words for (var n = 0; n < this.getPageNumWords(p); n++) { if (this.getPageNthWord(p, n) == stringToSearchFor) { pageArray.push(p); break; } } } if (pageArray.length > 0) { // extract all pages that contain the string into a new document var d = app.newDoc(); // this will add a blank page - we need to remove that once we are done for (var n = 0; n...

Best PDF generation technologies in java other than iText? [on hold]

Best PDF generation technologies in java other than iText? [on hold] Is there any best technologies for generating PDF other than iText? We have a product and we need to integrate PDF. FYI, the technologies we used in our product are Spring, hibernate, SQL server. Thanks in advance This question appears to be off-topic. The users who voted to close gave this specific reason: how do you define best ? Performance? Configurability? Portability? Independence? Backward Compatibility? Please edit your question, telling us why you don't want to use iText – Lino 2 days ago What do you mean by integrate: view pdf, generate pdf? I doubt you only want to package a pdf in your jar ;) – AlexS 2 days ago ...