How to provide one-touch access to a PDF file in the cloud with rich features like annotation? - iphone

I need to be able to download a PDF file from a location on the Internet and then open it (just the file, not to a specific page) in an app like Goodreader or even iBooks.
What I originally thought was that I would put an icon on my users' home page that launches a PDF file in an app, similar to how in Safari you can "Add To Home Page" and add a link onto the Home Page. The idea would be to have that functionality but with an, e.g., ibooks:// link rather than an http:// and it would open the pdf being linked to there within iBooks.
I am able to launch Safari to view a PDF using the Add To Home Page function to put an icon on the Home Page pointing to a PDF at a certain URL, so I am wondering if using, e.g. a Scheme definition I can pull it off.
So my solutions so for are:
1) Create a link to the PDF to open in Safari using "Add To Home Page" (offers zero functionality, including the hard requirement of being able to annotate the PDF)
2) Employ a specific App's Custom URL Scheme Definiton with the iPhone Configuration Utility's "Web Clips" create something to the effect of ibooks://www.pdf.com/document.pdf (i dont think this works)
3) Write a custom app and figure out how to do the annotating part myself (Did this using FastPDFKit but it does not include anything for annotating which is really key)

I believe if you put a g infront of the URL when adding to home screen, it will open with GoodReader when launched.

Related

swift open urls from pdf file

I'm working with pdf files that have urls inside it, and it's presented like images, I want the pdf to be presented like html file, so when the user clicks on a url inside the document it opens the url using safari
I'm using this library to read pdf files
https://github.com/Alua-Kinzhebayeva/iOS-PDF-Reader
and I have no problem to migrate to another library if it supports what I need
From a quick look at that library, it appears it is rendering each page as an image and then displaying it. It would probably be pretty tough to use that library to allow clickable links.
I don't have any experience with 3rd party solutions but theres a couple ways to do it provided by Apple.
You could show the pdf in a WKWebView or a QLPreviewController. Both have delegate methods that are called when a link is clicked.

open ms doc,docx or image file in browser in c#

I have developed the asp.net mvc application. my one form have the file upload control. so in details view i want to implement the facility to view the uploaded document in browser itself. it should not ask for download and should not open MS office instance to open document. its a user req. It should opens in view mode in browser itself. what code i have to do ? I am using C# as language.
It is not straight forward. For images you can use <img>tag and link to the location in server where you saved the uploaded image. That should work.
However ASFAIK showing the doc/docx things in web page itself is not possible. You will have to employ some third party control to achieve that. Search google to find such controls. May come at a cost.

(Iphone) associate an App to some file extension to open email attachments in Mail app

I found that some application, like "GoodReader" or "Docs to Go", once installed can be activated using the "Open in" function when opening an email attachment in the Mail App. How to add this function to have my App to be associated to some kind of documents (like pdf) ?
The idea is to have an easy way to get mail attachments to be used directly inside an app.
Edit: I found this document and think it fits my question:
Document Support
An application can now register the file types it supports with the system and receive notifications when a file of the given type needs to be opened. It does this by including the CFBundleDocumentTypes key in its Info.plist file. An application that registers one or more file types may also be expected to open files of those types at some point later. It does this by implementing the
application:didFinishLaunchingWithOptions:method in its application delegate and look for a file
in the UIApplicationLaunchOptionsURLKey key of the provided dictionary.
Complementing the ability to open files of known types is the addition of the
UIDocumentInteractionControllerclass in the UIKit framework. This class provides a user-based
interaction model for managing files that your application does not know how to open. The document
interaction controller provides options for previewing the contents of a file in place or opening it in another
application. Document interaction controllers are particularly useful for email applications or applications
that may download files from the network.
take a look at Custom URL Schemes and UIDocumentInteractionController. If you are looking to add the "open in" menu, the second link is what you need. If you are looking to register as a "PDF reader" this link (scroll to section about registering your app for certain types) should work iPad Programming Guide

how to open a file in iWork in the iPad

From what I understand, UIApplication -openFile can open files externally, the application depending on the URL scheme. Say I have a pages (or word maybe?) document, and I want to open it in pages from my app. Does anyone know the URL scheme for me to do that? Is there a list anywhere? (Keynote, and Numbers would also be useful).
It doesn't work that way because you cannot transmit the file via a URL and Pages cannot access a file that is stored in your app's sandbox.
If you want to give the user the option to open a file in Pages in your UI, UIDocumentInteractionController is the way to do that. It presents a UI where the user can preview the file and select to open it in any application that supports the file type.
AFAIK it is not possible with the SDK to do this completely programmatically, i.e. without user interaction.

How can I simply add a downloadable PDF file to my page?

I want to add a pdf and word format of my resume to my portfolio page and make it downloadable. Does anyone have some simple script?
Add a link to the file and let the browser handle the download.
You may be over-complicating the problem. It's possible to use a href pointing to the location of the .pdf or .doc file, when a user clicks on this in their browser, generally they will be asked if they would like to save or open the file, depending on their OS/configuration.
If this is still confusing, leave a comment and I'll explain anything you don't get.
Create the PDF. Upload it. Add a link.
Save yourself 30 minutes tossing around with PDFGEN code.
You will want to issue or employ the Content-Disposition HTTP header to force the download otherwise some browsers may recognize the common file extensions and try to automatically open the file contents. It will feel more professional if the link actually downloads the file instead of launching an app - important for a resume I think.
Content-Disposition must be generated within the page from the server side as far as I know.
Option:
Upload your resume to Google Docs.
Add a link to the file on your portfolio page just as I do in the menu of my blog:
Use Google Docs Viewer passing to it the URL of the PDF as you can see in this link.