pdf

Digital signature in each page using iText [duplicate]

好久不见. 提交于 2020-08-26 11:12:43
问题 This question already has answers here : How to show digital PDF signature in all document's Page using iText? (2 answers) Closed 3 years ago . I have generated a report which have 3 pages using iReport. Now the signature only appears in one page. But I need to sign each page using iText. PdfReader reader = new PdfReader(fullFilePath); String outputPath = reportPath + randomUUID + fileExtension; FileOutputStream fout = new FileOutputStream(outputPath); stp = PdfStamper.createSignature(reader,

Fill PDF Input fields with Javascript

孤者浪人 提交于 2020-08-26 07:41:05
问题 How is it possible to fill PDF input fields with javascript ( if it is even possible ). In my case I want to create a javascript in which I can fill a HTML form, the data which the user put in the HTML form should be saved into the PDF Input Field. Thanks in advance. 回答1: I was looking on how to populate existing fields in a PDF with Node and after a while I found pdf-fill-form as a great option to do so. And you can use it really easy // First get the Id of the value you need to populate in

dompdf stream pdf in browser using localhost, but not in network ip

流过昼夜 提交于 2020-08-26 04:59:52
问题 i need to know why dompdf doesn't stream a pdf in browser before download on network ip like 192.168.1.77 , but it works on localhost. when using network ip, it just immediately download the file , it won't show pdf preview in browser i'm using dompdf version 0.6.2 this is my code $dompdf = new DOMPDF(); ob_start(); $this->load->view('report_me',array_merge($this->sesi,$this->session->userdata('printdata'))); // header('Pragma','public'); $html = ob_get_contents(); ob_end_clean(); // $this-

How to get the selected text from an embedded pdf in a web page?

南楼画角 提交于 2020-08-25 04:25:06
问题 Here's an example of a pdf document from which I need to extract the user's selection http://www.ada.gov/hospcombrprt.pdf . If we look in the page source we will see smth like: <html> <body marginwidth="0" marginheight="0" style="background-color: rgb(38,38,38)"> <embed width="100%" height="100%" name="plugin" src="http://www.ada.gov/hospcombrprt.pdf" type="application/pdf"> </body> </html> How can we get a user's selection from this embedded pdf? I found a post about extracting the whole

Watermark two pdfs - Each page of the first with each page of the second

风格不统一 提交于 2020-08-25 04:10:24
问题 I have two pdf files of the same length, let's say pdf1.pdf and pdf2.pdf. I'm trying to watermark each page of pdf1.pdf with pdf2.pdf (i.e., page 1 of pdf1.pdf with page 1 of pdf2.pdf, page 2 of pdf1.pdf with page 2 of pdf2.pdf ...). However, I'm really struggling with how to loop them around (I'm new to programming). For example, I tried this: import PyPDF2 from PyPDF2 import PdfFileMerger from PyPDF2 import PdfFileReader, PdfFileWriter output = PdfFileWriter() ipdf = PdfFileReader(open(

Print a specific PDF page using command line

我怕爱的太早我们不能终老 提交于 2020-08-17 04:35:27
问题 I am working in Windows platform. It is possible to open a PDF file at a specific page: AcroRd32.exe /A "page=3" "file.pdf" Is there a similar solution for printing a specific page? Something like: AcroRd32.exe /P "page=3" "file.pdf" 回答1: Is there a similar solution for printing a specific page? Something like: AcroRd32.exe /P "page=3" "file.pdf" No. There is no option to print a specific page. What you could do is use the /p option together with a VBS (or similar) script to manipulate the

How to change PDF Version of existing PDF by overwriting original file in IText?

*爱你&永不变心* 提交于 2020-08-10 20:30:21
问题 I have the following code to change the pdf version of a pdf file. I do not want to have a second file at the end, but rather want the original file's pdf version to be updated directly. So my pdfs for reading and writing are the same: WriterProperties wp = new WriterProperties(); wp.setPdfVersion(PdfVersion.PDF_1_6); PdfDocument pdfDoc = new PdfDocument(new PdfReader("orig.pdf"), new PdfWriter("orig.pdf", wp)); pdfDoc.close(); But by doing this I get an error with A fatal error has been

Crystal Reports 11 - Useless blank page is added with just group headers that have data

与世无争的帅哥 提交于 2020-08-08 05:53:48
问题 I have a weird problem I have never seen before using Crystal Reports. I built a complex PDF monthly report for a bank that generates over 200 pages. The specifications took months to adjust with the client but it works perfectly now, showing all the data it's supposed to, all sorted right and with the right headers. But for some reason the report inserts quasi-blank pages rarely and seemingly randomly before it shows data. These pages aren't entirely blank, all my headers including group

Export a range as a PDF in Google Apps Script

纵然是瞬间 提交于 2020-08-05 09:59:07
问题 I've searched all over for some lines of code that would accomplish what I want, but I'm too unfamiliar with how google apps script works. I've only ever coded in Microsoft excel and although I'm not completely lost, I'm still pretty lost. I am looking for code that would select a range, then "Download as.." the selection to PDF, fit width, portrait, no grid. Ideally this PDF could be sent to a specific folder on my desktop, but I don't know if the apps script supports that. I've found the

How to detect a rotated page in a PDF document in Python?

核能气质少年 提交于 2020-08-05 04:17:21
问题 Given a PDF document with multiple pages, how to check if a given page is rotated (-90, 90 or 180º)? Preferable using Python (pdfminer, pyPDF) ... UPDATE: The pages are scanned, and most of the page is composed by text. 回答1: I used simply /Rotate attribute of the page in PyPDF2 : pdf = PyPDF2.PdfFileReader(open('example.pdf', 'rb')) orientation = pdf.getPage(pagenumber).get('/Rotate') it can be 0 , 90 , 180 , 270 or None 来源: https://stackoverflow.com/questions/34515674/how-to-detect-a-rotated