pdf-reader

iText - read PDFs created with an unknown random owner password

坚强是说给别人听的谎言 提交于 2019-12-24 12:23:43
问题 I'm getting the following exception when excecuting this code: public byte[] watermarking(byte[] orig) throws IOException { PdfReader pdfReader = new PdfReader(orig); ByteArrayOutputStream baos = new ByteArrayOutputStream(); PdfStamper pdfStamper = null; try { pdfStamper = new PdfStamper(pdfReader, baos); //exc here ... } ... } catch (DocumentException var8) { ... } } Exception: 11:43:11,094 ERROR [de.mlp.xbg.pa.rest.SessionRR] (http-/127.0.0.1:8081-6) PdfReader not opened with owner password

Extracting entire pdf data with python pdfminer

孤街浪徒 提交于 2019-12-21 17:53:39
问题 I am using pdfminer to extract data from pdf files using python. I would like to extract all the data present in pdf irrespective of wheather it is an image or text or whatever it is. Can we do that in a single line(or two if needed, without much work). Any help is appreciated. Thanks in advance 回答1: Can we do that in a single line(or two if needed, without much work). No, you cannot. Pdfminer is powerful but it's rather low-level. Unfortunately, the documentation is not exactly exhaustive. I

How to read pdf file from document directory in iPhone?

旧街凉风 提交于 2019-12-20 14:43:55
问题 Currently i am working in iPhone application, i have an pdf file in resource folder (Local pdf file) then i read that pdf file (paper.pdf) successfully, below i have mentioned read local pdf file for your reference. Example: CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("paper.pdf"), NULL, NULL); pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL); CFRelease(pdfURL); Then i have tried to store pdf file (from URL) in NSDocument directory, stored successfully. NSData

PDF Reader in .NET

左心房为你撑大大i 提交于 2019-12-19 10:54:12
问题 I want to read PDF files from my .net application. Are there any free libraries available to do this? 回答1: If you are looking for free PDF Read/Write .Net library, then you can visit https://itextpdf.com/ (previously itextsharp) Note: As mentioned by Dexters, this is library no more free for commercial purpose. It comes under Affero General Public License (AGPL) 回答2: You could take a look at PDFSharp: http://www.pdfsharp.com/PDFsharp/ 回答3: PDFBox is open source and supports advanced text

How to give page curl animation in webView?

眉间皱痕 提交于 2019-12-18 09:50:15
问题 I am working on PDF Reader application. if i display pdf file then i am not able to change font size of this. So i display ePub file in UIWebView. But my problem is how to add page curl animation in UIWebView like iBook and kindle apps does. 回答1: I have created a UIWebView named myWebView and on clicking the button the curl effect will be shown on the webview:- -(IBAction) nextPageAnimationForWebView{ CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation

Android PDF reader from scratch

巧了我就是萌 提交于 2019-12-17 22:09:23
问题 I know it sounds ambitious but our client requires a PDF Reader of his own with some selected functionalities. Can anyone guide me to some good tutorials for paving the way to start this development? I guess I need to clear some pdf basics and start from scratch OR i would be happy if there is any library which i can use directly and only modify the controls at my will. 回答1: In terms of specific Android implementation, I really can't advise you there, I'm afraid. However, there is a lot of

Unable to install textract

时光毁灭记忆、已成空白 提交于 2019-12-12 21:22:16
问题 Using the command pip install textract I'm unable to install textract on my Ubuntu 16.04, Python 2. I get the following error: Collecting textract Requirement already satisfied: python-pptx==0.6.5 in ./anaconda2/lib/python2.7/site-packages (from textract) (0.6.5) Requirement already satisfied: docx2txt==0.6 in ./anaconda2/lib/python2.7/site-packages (from textract) (0.6) Requirement already satisfied: six==1.10.0 in ./anaconda2/lib/python2.7/site-packages (from textract) (1.10.0) Requirement

iTextSharp - Check PDF Document Properties - Content Copying, Content Copying For Accessibility

左心房为你撑大大i 提交于 2019-12-12 04:32:36
问题 I'm trying to check whether PDF document to be uploaded has the following document properties - Content Copying & Content Copying For Accessibility Allowed / Not Allowed using iTextSharp PDFReader. Is there any property to verify this functionality. I have pasted a sample code which is NOT returning the expected result. Looking for solution using iTextSharp Sample Code: using (PdfReader r = new PdfReader(@"xxx\yyy.pdf")) { if (PdfEncryptor.IsScreenReadersAllowed((int)(r.Permissions))) {

ReportLab and pdfrw: Importing Scanned PDF

≡放荡痞女 提交于 2019-12-11 03:39:35
问题 Using the code below, I am trying to import a pdf page into an existing canvas object and save to PDF. This usually works just fine, but I noticed that when I try it with a PDF generated from a scanned document, it results in a blank page. Any takers? from reportlab.pdfgen import canvas from pdfrw import PdfReader from pdfrw.buildxobj import pagexobj from pdfrw.toreportlab import makerl c = canvas.Canvas(Out_Folder+pdf_file_name) c.setPageSize([11*inch, 8.5*inch]) page = PdfReader(folder+'2

PdfFileReader: PdfReadError: Could not find xref table at specified location

空扰寡人 提交于 2019-12-10 20:13:00
问题 I am trying to read Pdf file in python through: from PyPDF2 import PdfFileReader, PdfFileWriter test_reader = PdfFileReader(file("test.pdf", "rb")) Above Line throws error: PyPDF2.utils.PdfReadError: Could not find xref table at specified location Any help will be highly appreciated 回答1: It's fixed. Actually, there wasn't any problem. Seems, the pdf I was using to test was corrupted one (even though when I opened it, the content was there, which is why I couldn't figure out at first place) I