Browse pdf with IText (or Itextsharp) - itext

I'm receiving a pdf that contains some data I would like to parse.
For example, there's an array with some integer data that I would like to parse for an automatic treatment.
I've looked at itext but the sample I've found are for writing pdf only.
Can someone give me an example of how to read through a pdf ?
Thanks in advance for any help.
Best regards

PdfBox is much better for reading text from a PDF file.

Finally,
I'm converting PDF to Word and I'm using Word interop :)

Related

How to read pdf table content data?

I have a requirement to read a pdf file having tabular format data only like in excel file. I need to extract the cell value of given pdf file.
Is it be anyhow possible using itext API. If you have something to share then please share it or any other solutions?
The PDF format is just a canvas where text and graphics are placed without any structure information. As such there aren't any iText-objects in a PDF file. In each page there will probably be a number of Strings, but you can't reconstruct a phrase or a paragraph using these strings. There are probably a number of lines drawn, but you can't retrieve a Table-object based on these lines.
In short: parsing the content of a PDF-file is NOT POSSIBLE with iText.
You can try this! This lets you read PDF pages.
I recently ran into this problem. I wasn't able to make it work with itext.
An alternate solution I found was to open a PDF document in Adobe and export it to xml. At least with my PDF's it preserved the table information and then I was able to programmatically work with the XML to generate tabular files like excel etc.
The other issue I ran into was that Adobe only lets you export one file at a time and I had lots of files. Luckily Adobe also has a merge function. I ended up merging all the files together and then exporting them as one big XML file and working with that file to generate what I needed.

Convert PDF documents to TIFF using iTextSharp

Using iTextSharp, I want to convert PDF documents into Tiff. Is there any example? Thanks for your time.
I think you can't do that with iTextSharp and someone agrees with me.
Take a look at Ghostscript: with a little work you can achieve your goal.

editing pdf contents in uiwebview iphone

hi im working on pdf manipulation.
my requirements are to edit the existing pdf document.
looks like there is no actual way to do it. i found out using javascript i can edit the html contents.
so now that my pdf is in uiwebview is there any way to convert pdf document to html content???
i have to do it programatically.
preferred language is objective c but its k if any suggestions in C/C++
thanks in advance
You will have to drop down to C if you want to do this. Basically you need to get hold of a CGPDFDocumentRef reference, and through that iterate each CGPDFPageRef. From the page you can get access to the CGPDFContentStreamRef.
From the content stream you can parse out the primitive data that is is PDF document. From there only a good understanding of the PDF document format can help you.
I would advice you to find a commercial tool, hire an experience contractor, or change your plan. What you have your sights on is allot of hard work.

Converting .doc Format to Pdf file in iphone

How do i Convert .doc format to pdf file from iphone .
i Want same layout as .doc format.
i Tried with html format but did not get any success.
anyone suggest any solution would be appreciated.
Thank you.
Since you are creating a PD based on a DOC Docmosis might help. The cloud system can work from an iPhone as long as you are happy calling a web service.

Generate PDF from html file on iPhone

In my iPhone application I'm generating an HTML file. I would like to convert that HTML file to a PDF file programatically. The PDF will then be attached to an email.
Does anyone know (have an example) how to convert the HTML file to a PDF?
maybe you should start from here: http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
I don't know if this is what your looking for it helped me because it's much easier to generate a prepared html doc then PDF for me. I found a library that does that here http://maniacdev.com/2013/09/ios-library-for-easy-pdf-creation-from-an-html-string-or-URL