Is there a way to display PDF on Apple tvOS? - pdf

I just started exploring Apple's tvOS and am looking if there is a way to display PDFs in a carousel or of that sorts. However, I cannot find a way to achieve that without converting PDF to JPEG images. Can someone guide me if there is a Document object that can read and render PDF on tvOS?

I think CGPDFPage and its related API:s are available, https://developer.apple.com/library/prerelease/tvos/documentation/GraphicsImaging/Reference/CGPDFPage/index.html

Related

Alternative to PDF on iPad

I have to create a PDF reader for Ipad, so i read about CGPDFdocument and UIWebView.
In my opinion CGPDFDocument is too complex(i need to mange link) and using a UIWebView i can't customize behavior.
Is there an alternative way to build that? Perhaps a way to convert PDF to another format like ebook ?
Thank you !
What's hard about CGPDFDocument? Apple's example in the Quartz2D programming guide is only 30 lines long.

How to convert html data to PDF in objective c

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.

QuickLook plugin displaying an image and some infos

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...

Search and Highlight text in PDF for IPad

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

Hyperlinks for PDF in the iPhone

How to add/access hyperlinks (both internal and web page) in the PDF in iphone?
Sri
Not sure if you are asking this from a user or implementation perspective, I assume implementation as this is a programming Q/A site:
The PDF will more than likely be rasterized to an image for the phone, it will be up to the reader to extract the text/links and overlay these over the image to make them clickable.
I have seen this type of thing in flash readers/pagers where these link/hotspots are configured manually, obviously not an option for a generic PDF reader
This is the best that I have found on SO: Fast and Lean PDF Viewer for iPhone / iPad / iOs - tips and hints?. Many links and helpful tips.