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.
Related
I have been looking into the supported features of UITextView and its accompanying library Core Text. Under MacOSX you have NSTextTable which allows you to add tables to your text only. Sadly enough, this class is not supported under iOS. Now my question is what is the best approach to support this under iOS?
Just want to make a simple table with five columns. If I understood it correctly I might be able to do something by creating custom attributes for NSAttributedString. Only I am not sure what the best approach is? The objective is that I can create a text document with one table which I can export to RTF. For the latter I would need to write my own RTF exporter class that shouldn't be a big problem. As the RTF format is quite well documented on the Internet. My major problem is how to get the table shown in my text view.
Or should I just go for a UIWebView instead?
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 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
I'm using Quartz 2D to render PDF on the iPad, this works fine.
Now I need a way to get the document outline (table of content), I found the following function CGPDFDocumentGetCatalog which seems to be relevant, but the returned info is an opaque dictionary from which I don't know the keys.
I want the outline in a tree with the page number for each entry.
I'm interested in any answer I can use on the iPad, even if it use an other library.
https://github.com/below/PDF-Voyeur
I'm currently writing a QuickLook plugin, and I wondering how I can display an image and some information about that image at the same time, similar to http://www.code-line.com/software/sneakpeekphoto/ .
There is only one way to do so: Convert your content to an already supported one. This means either PDF or HTML. There are two options you have:
For static information you create a simple PDF preview by rendering a view into a PDF. (Use -dataWithPDFInsideRect: method of NSView)
For dynamic information create a HTML page with links and so on. QuickLook will then show it. (I think this is also the way your example does it.)
We have not found a way to create complex previews on ur own and had to stick to one of the methods, too. Keynote and Pages do the same -- they convert their presentations to multi-page PDF previews...