pdf-reader

QLPreviewController delegate method doesn't get called in iOS 10, but does get called if ran earlier than iOS 10

痞子三分冷 提交于 2019-12-08 14:15:50
问题 Here is my code. This may sound like redundant question but my scenario is different as I am not adding QLPreviewController as a subview but present as a controller. After downloading from dropbox, I present it like- self.pdfViewController = [[QLPreviewController alloc] init]; self.pdfViewController.delegate = self; self.pdfViewController.dataSource = self; [self presentViewController:self.pdfViewController animated:YES completion:nil]; and I also have QLPreviewControllerDataSource,

How to Detect table start in itextSharp?

大城市里の小女人 提交于 2019-12-06 11:42:05
问题 I am trying to convert pdf to csv file. pdf file has data in tabular format with first row as header. I have reached to the level where I can extract text from a cell, compare the baseline of text in table and detect newline but I need to compare table borders to detect start of table. I do not know how to detect and compare lines in PDF. Can anyone help me? Thanks!!! 回答1: As you've seen (hopefully), PDFs have no concept of tables, just text placed at specific locations and lines drawn around

How to read PDF files which are in asian languages (Chinese, Japanese, Thai, etc.) and store in a string in python

巧了我就是萌 提交于 2019-12-06 06:35:47
问题 I am using PyPDF2 to read PDF files in python. While it works well for languages in English and European languages (with alphabets in english), the library fails to read Asian languages like Japanese and Chinese. I tried encode('utf-8') , decode('utf-8') but nothing seems to work. It just prints a blank string on extraction of the text. I have tried other libraries like textract and PDFMiner but no success yet. When I copy the text from PDF and paste it on a notebook, the characters turn into

How to Detect table start in itextSharp?

六月ゝ 毕业季﹏ 提交于 2019-12-04 18:35:24
I am trying to convert pdf to csv file. pdf file has data in tabular format with first row as header. I have reached to the level where I can extract text from a cell, compare the baseline of text in table and detect newline but I need to compare table borders to detect start of table. I do not know how to detect and compare lines in PDF. Can anyone help me? Thanks!!! Chris Haas As you've seen (hopefully), PDFs have no concept of tables, just text placed at specific locations and lines drawn around them. There is no internal relationship between the text and the lines. This is very important

How to read PDF files which are in asian languages (Chinese, Japanese, Thai, etc.) and store in a string in python

…衆ロ難τιáo~ 提交于 2019-12-04 14:56:20
I am using PyPDF2 to read PDF files in python. While it works well for languages in English and European languages (with alphabets in english), the library fails to read Asian languages like Japanese and Chinese. I tried encode('utf-8') , decode('utf-8') but nothing seems to work. It just prints a blank string on extraction of the text. I have tried other libraries like textract and PDFMiner but no success yet. When I copy the text from PDF and paste it on a notebook, the characters turn into some random format text (probably in a different encoding). def convert_pdf_to_text(filename): text =

Displaying PDF files with python3

老子叫甜甜 提交于 2019-12-03 09:34:52
问题 I want to write a python3/PyGTK3 application that displays PDF files and I was not able to find a python package that allows me to do that. There is pypoppler, but it looks outdated (?) and does not seem to support python3 (?) Do you have any suggestions? EDIT: Note, that I don't need fancy features, like pdf forms, manipulation or writing. 回答1: It turns out, that newer versions of poppler-glib don't require bindings as such. They ship with GObject Introspection files and can therefore be

How to read pdf file from document directory in iPhone?

限于喜欢 提交于 2019-12-03 03:49:01
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 *pdfData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.msy.com.au/Parts

PDF Reader

一曲冷凌霜 提交于 2019-12-01 13:21:31
I want to read PDF files from my .net application. Are there any free libraries available to do this? If you are looking for free PDF Read/Write .Net library, then you can visit http://itextsharp.sourceforge.net/ Note: As mentioned by Dexters, this is library no more free for commercial purpose. It comes under Affero General Public License (AGPL) You could take a look at PDFSharp: http://www.pdfsharp.com/PDFsharp/ aleemb PDFBox is open source and supports advanced text extraction . It also supports lucene search so it's ideal for creating a lucene index. 来源: https://stackoverflow.com/questions

Fastest way to check that a PDF is corrupted (Or just missing EOF) in Ruby?

点点圈 提交于 2019-12-01 11:16:52
I am looking for a way to check if a PDF is missing an end of file character. So far I have found I can use the pdf-reader gem and catch the MalformedPDFError exception, or of course I could simply open the whole file and check if the last character was an EOF. I need to process lots of potentially large PDF's and I want to load as little memory as possible. Note: all the files I want to detect will be lacking the EOF marker, so I feel like this is a little more specific scenario then detecting general PDF "corruption". What is the best, fast way to do this? TL;DR Looking for %%EOF , with or

Fastest way to check that a PDF is corrupted (Or just missing EOF) in Ruby?

半城伤御伤魂 提交于 2019-12-01 09:25:48
问题 I am looking for a way to check if a PDF is missing an end of file character. So far I have found I can use the pdf-reader gem and catch the MalformedPDFError exception, or of course I could simply open the whole file and check if the last character was an EOF. I need to process lots of potentially large PDF's and I want to load as little memory as possible. Note: all the files I want to detect will be lacking the EOF marker, so I feel like this is a little more specific scenario then