pdf

CFPDF add watermark any level of transparency is coming out opaque

喜夏-厌秋 提交于 2021-01-29 02:10:21
问题 When I watermark a pdf onto another pdf any semi-transparency in the watermark PDF is made completely opaque. Is there anything I can do about this or is this a limitation of CFPDF? Server is CF9 with latest hotfixes. Fun bit, when chrome renders the final product the transparency is preserved, but when Acrobat Pro renders it it's opaque. I can print the final product to AdobePDF and it's accurately transparent, but I don't get a consistent page size to send through our print shop which is a

CFDocument PDF not showing Japanese data

折月煮酒 提交于 2021-01-28 21:06:09
问题 I have created a pdf with Japanese content using CFDocument. But It does not showing the Japanese data. I have used pageEncoding as utf-8. It showing only blank space instead of Japanese data. I have used the following code, <cfcontent type="application/pdf"> <cfheader name="Content-Disposition" value="attachment;filename=test.pdf"> <cfprocessingdirective pageencoding="utf-8"> <cfdocument format="PDF" localurl="yes" marginTop=".25" marginLeft=".25" marginRight=".25" marginBottom=".25"

How to add footer to pdf with pdfjam or pdftk?

萝らか妹 提交于 2021-01-28 19:56:21
问题 I am using a shell script to modify many pdfs and would like to create a script that adds the page number (1 of X format) to the bottom of PDFs in a directory along with the text of the filename. I tried using pdfjam with this format: pdfjam --pagenumbering true but it fails saying undefine pagenumbering Any other recommendations how to do this? I am OK installing other tools but would like this to all be within a shell script. Thank you 回答1: tl;dr: pdfjam --pagecommand '' input.pdf By

How to read the pdf file using selenium

你。 提交于 2021-01-28 19:22:19
问题 I am working on web page over which there is a link, clicking on which it opens a pdf file on new window. I have to read that pdf file to validate some data against the transactions done. One way is to download that file and then use it. Can any one help me out on this. I have to work on IE 11 Thanks in Advance. 回答1: Use PDFBox and FontBox. public String readPDFInURL() throws EmptyFileException, IOException { WebDriver driver = new FirefoxDriver(); // page with example pdf document driver.get

How to convert 10MB PDF to SVG quickly with appropriate size for web

╄→尐↘猪︶ㄣ 提交于 2021-01-28 19:08:39
问题 Good day, I have read all questions and answers about "PDF to SVG", "PDF to PNG, PNG to SVG" and had no success in accomplishing my task. I have a PDF that is about 10mb (blueprints from archiCAD) and after using pdf2svg to convert to SVG, the SVG is about 70mb. Conversion takes 14sec, but the web page load takes about 150sec because of the size of the SVG. My question is - how can i convert PDF in PHP to SVG with appropriate size for web without quality loss and without gzipping it? This

Rotativa - controllercontext is null

假如想象 提交于 2021-01-28 18:56:20
问题 i work with ASP.NET MVC and i try to use rotativa for build a pdf by model. The problem is that in this context i operate in a model (i can't move the code in controller), and i write a procedure into a controller for build pdf. Like this MODEL: ModelNIR modelloNIR = new ModelNIR(); modelloNIR.ufficio = Ufficio; if (r != null) { modelloNIR.ruolo = r.Descrizione.ToUpper(); //pdfFormFields.SetField("RUOLO", r.Descrizione.ToUpper()); //pdfFormFields.SetField("RUOLO2", "RUOLO " + r.Descrizione

Apache PDFBox refuses to open temporary created PDF file

断了今生、忘了曾经 提交于 2021-01-28 18:51:08
问题 I am creating desktop JavaFX application for viewing PDF files. PDFs are at resource folder. I read resourse file as stream, then I create temporary file and use it to convert contents to image and show into ImageView. currentPdf = new File("current.pdf"); if (!currentPdf.exists()) { // In JAR InputStream inputStream = ClassLoader.getSystemClassLoader() .getResourceAsStream("PDFSample.pdf"); // Copy file OutputStream outputStream; try { outputStream = new FileOutputStream(currentPdf); } catch

Pandoc Markdown to Latex PDF: table merges rows in single row?

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-28 18:24:25
问题 Consider this example for test.md Markdown file: --- title: "Testing" author: Bob Alice date: July 07, 2010 geometry: margin=2cm documentclass: extarticle fontsize: 12pt output: pdf_document --- Here is a test of a table: +----------+-------------------+-----------------+ | Box name | Another parameter | The IP address | +==========+===================+=================+ | Test 1 | random-string-01 | 10.0.0.20 | | Test 2 | random-string-02 | 10.0.0.30 | +----------+-------------------+-------

zip a pdf file created using itext

删除回忆录丶 提交于 2021-01-28 15:10:29
问题 response.setHeader("Content-Disposition", "attachment; filename=r.pdf"); Document document1 = new Document(PageSize.A4); PdfWriter pdfWriter=PdfWriter.getInstance(document1, response.getOutputStream()); pdfWriter.setPageEvent(new HeaderAndFooter(name)); try{ document1.open(); XMLWorkerHelper worker1 = XMLWorkerHelper.getInstance(); long seed =123; Random rnd = new Random (seed); Collections.shuffle(arrlist1,rnd); for(int i=0;i<nb;i++){ String str =(String) arrlist1.get(i); worker1.parseXHtml

zip a pdf file created using itext

泪湿孤枕 提交于 2021-01-28 15:03:26
问题 response.setHeader("Content-Disposition", "attachment; filename=r.pdf"); Document document1 = new Document(PageSize.A4); PdfWriter pdfWriter=PdfWriter.getInstance(document1, response.getOutputStream()); pdfWriter.setPageEvent(new HeaderAndFooter(name)); try{ document1.open(); XMLWorkerHelper worker1 = XMLWorkerHelper.getInstance(); long seed =123; Random rnd = new Random (seed); Collections.shuffle(arrlist1,rnd); for(int i=0;i<nb;i++){ String str =(String) arrlist1.get(i); worker1.parseXHtml