How can I open or display PDF file without using UIWebView. I need to use UIView for horizontal scroll for PDF View.
If don't want to use UIWebView then your alternative is to use QLPreviewController for showing PDF file.
Can also use UIDocumentInteractionController
Check sample from apple ie docInteraction for more reference.
Check out the OpenSource Reader project on GitHub.
Look up CGPDFDocument and the related APIs. That should get you going.
Related
I am currently using UIDocumentInteractionController to view pdf files. I know I can use UIWebView also.
My question is,
Is it possible to do text reflow for pdf files in swift where I can change font size and make it easier to read ? Is there any open source library for that?
I am saying something like this
Does apple PDFKit able to do it? Has any one tried it before?
Thanks!
I am building cordova print plugin using EPSON epos iOS SDK, to use it with hybrid mobile apps( ionic framework based). The sdk provides methods for printing text and image. But I have to print HTML template using it. is there any way to do so?
like if I can prepare UIWebView object from the template and convert it into UIImage. I am new to iOS development so dont know any proper way of doing that.
You can render the UIWebView offscreen, and then capture its as a UIImage. the answers below might help you solve the problem. One problem you may face is that UIWebView doesn't loads unless you add it on a UIWindow, this window can be any UIWindow object, not necessarily the window you are displaying to user.
How to get ENTIRE image from UIWebView including offscreen content
Does iPhone/iPad UIWebView need to be active view to render?
How do I save the contents of a UIWebView as an image
I have browsed and searched a lot for this but couldn't find any relevant answers/posts. I am looking for a framework/library with the help of which I can convert ppt slides into images and then render them on iOS device. Any other way/procedure which will display ppt page-wise with giving control on page transition will also be great.
Thanks in advance
If you just want to view the Office files, have a look at:
Document Interaction Programming Topics for iOS: Quick Look Framework.
Quick Look Framework Reference
Quick Look Framework supports a lot of file formats as you can see in the links above. It is available in iOS 4.0 and later.
You can also use UIWebView to display them. See Using UIWebView to display select document types.
I have to develop a iPad app which can view a PDF file and draw some predefined annotations on it dynamically. It's like http://plangrid.com/ do.
I went though WWDC videos, stackoverflow and some other blogs.
But could not find a way to add a controller bar on the PDF. And drag a annotation from it and drop on the PDF.
I have an idea about to view a PDF. I followed ZoomingPDFViewer example.
Please advise me.
I'm using XCode 4 and iOS 4.3.
I'm not sure if you found the following stackoverflow post:
Annotate PDF within iPhone SDK
The first answer shows how to add text to a pdf page at a given location. This should be helpful for your purposes.
1) I load a URL in UIWebview ,which has some images .I want to enable the option,"save photo" which appears when you long-press the images in webview.Currently this option is available in Safari Browser.But I couldn't find any option in UIwebView class, And UIdataDetectorType struct dont have option for images (as of my knowledge.)
So how do I have this in my APP?
2) when I open some PDFs in webview ,I want to provide an option to open the pdf in iBooks.
How to do?
Thanks in advance.
GopiKrishnAn
I think this should be 2 separate questions.
1/ Read this blog post by iCab's author: Customize the contextual menu of UIWebView. It shows you exactly how to implement long press detection in a UIWebView.
As a bonus, his blog is a wealth of useful information about UIWebView.
2/ You need to work with UIDocumentInteractionController. As its initialization method (+ (UIDocumentInteractionController *)interactionControllerWithURL:(NSURL *)url) only works with a local URL, I guess you need to download the PDF and save it somewhere before you are able to provide such options.