I want to create a table in a PDF, in which the data are coming from my iPhone app. How can i do that?
You can achieve the same with Quartz 2D, I found an excellent tutorial for this :
How To Create a PDF with Quartz 2D in iOS 5 Tutorial Part 2
Check out below link there are many other links to do so, it is called table of contexts.
pdf file text reading and searching
Related
I am working on iPad application in which i have to show PDF data into table. Firstly,I want to fetch PDF file content into NSString, how to achieve this. I tried a lot but i am unable to get it.
Thanks
You have to use Quartz2d.
Check this page of the Quartz 2D Programming Guide, it covers everything you need to open and parse a PDF file in iOS. Note that it is not a simple task, since there's no method to extract the full text in one line. You have to work with the data as an input stream, using a CGPDFScanner
I am right now working with one pdf based application in ipad. Now i am able to display the pdf file in the ipad,but now i want to show some annotation based operations on the same pdf file. and for the same purpose,i need to select the text.Is there any function available that may help to select the text to perform the operations?
Thanks in advance.
EDIT :
I surfed net and found some code that was helpful for UITouch in the following link
but am not getting way to implement it for my purpose. Can Somebody show me a path?
Kindly show me a path.
This is the best resource I have found on SO so far: Fast and Lean PDF Viewer for iPhone / iPad / iOs - tips and hints?. Maybe it will help. There is nothing on selecting text specifically, but maybe the "Getting raw test" and "Searching" sections will help you.
I've been looking for 2 days for a solution to that problem but didn't found anything yet. I need to create a PDF File with only one page which shows its content in a table (like a timetable). I'd like to fill the cells with string values, that I am getting from a XML file.
PDFKit wasn't usefull so far and Quartz 2D appears not to be a solution because it's quit complicated to draw a table which I can change easily. Are there any librarys or so to just create a one-paged-tableshowing PDF? Thanks
The easiest approach with the greatest flexibility would probably be to generate the table as HTML, use a WebView to display it and render it to PDF using NSView's dataWithPDFInsideRect: method.
I want to convert html to pdf dynamically in objective c.
what is the best way to convert it, so that it maintains its look same as html.
Thanks in advance.
Prasad.
UIGraphicsBeginPDFContextToFile will help you to create a PDF file which shows your web content. Read through the documentation and create your own solution or just follow the tutorials I found:
Convert Html or UIWebView to pdf in iPhone or iPad
Making a PDF from a UIWebView
I have used this Haru open source library, it is quite simple and useful for creating pdfs http://libharu.org/wiki/Main_Page
Objective-C is a programming language, it doesn’t know anything about HTML or PDF per se. How to do this depends on the framework you’re using. I’m assuming here you’re using Cocoa on OS X.
There you can load your HTML into a WebView provided by WebKit and then use the NSView method dataWithPDFInsideRect: to render it as PDF. I haven’t tested this, but maybe you’ll have to add the web view to a window before you can query the PDF data.
I am working on the PDF App for iPad and facing an issue: how to search a text in PDF and also how to highlight that text?
Yours is the same big problem I'm having. My understanding is that, currently on iOS 4.0, the main public API is CGPDF . It allows us to parse PDF, and with it we can search strings in it. See also this Quartz 2D document. It also allows us to render it on the screen using CGContextDrawPage. However, it's not yet possible to get the position of a text in the rendered image. (On OS X it's possible using PDFKit.)
So, I'm afraid that you need to implement the PDF spec yourself to get that info. I think GoodReader etc. is working very very hard to implement these.
I had the same trouble recently and then I found FastPDFKit. Have tested the package and it's working great.
http://mobfarm.eu/fastpdfkit