Use Adobe Reader to open a PDF from own app using WebViewController - objective-c

In my iPad app, I have a button that opens a document using a WebViewController to view the file.
For certain PDF documents that were viewable in iOS4, opening them on iOS5 now crashes the app. The same thing happens in Mail if I try to view these PDF documents that are attached to emails. However, if I tap and hold in Mail and select "Open with Adobe Reader," the document opens successfully.
Is there a way to change what is used to generate the view of the PDF in the WebViewController to use the Adobe Reader viewer, rather than the native PDF viewer?
I would like to do this directly within the same WebViewController, rather than using a UIDocumentInteractionController popover that shows the "Open in Adobe Reader" prompt.

To my knowledge the only way to do this would be if the Adobe Reader had a custom URL Scheme. You could 'intercept' the URL with a PDF extension and re-craft the URL to use the URL Scheme. However, to my knowledge Adobe Reader doesn't provide this URL scheme.
That being said, you can give the user the option to open files with a viewer of their choice (if they save it locally). If Adobe Reader is registered to open PDF files (and I'm sure it is) then you can create an 'Open With' button to determine how it should be opened. It will show all programs that can open a PDF file. For more information on this, check the Apple documentation:
http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1

Related

How to force open PDF in particular view?

I have few questions about it:
How to force pdf brochure open in particular view in browser? Is it possible? If not, how to do it in Acrobat Reader DC?
Thank you!
Not all PDF viewers, in-browser or otherwise, respect the "Initial View" settings. However, Acrobat Reader does. You can set the initial view, including page number, zoom level, page layout, and turn on or off some of the UI elements using the Initial View tab in the Document Properties dialog in the Acrobat Standard. Save the file with these properties and Acrobat Reader (and a few others) will respect them.

attachment is not working in adobe reader

I have a fillable pdf with few text boxes in it and a save button. When the user fills the form and clicks the save button using Acrobat Pro I am able to save the data as an attachment in pdf, But the problem is When the user opens the pdf using Adobe Reader and try to do the same thing as above I am getting following error.
I have been searching for a week but no luck. Is there any way to make createDataObject() function work in Adobe Reader? or Is there any other way we can embed data into pdf?
Note: I am using Acrobat Javascript for this functionality. And I am using Adobe Reader version 11 and Acrobat pro version 11 and my OS is Windows.
What I have read so far is that getting file attachments working in Adobe Reader requires certain security settings to be enabled. Check out this Adobe forum post. According to it, attaching files from within Adobe Reader is only possible if you have Adobe Reader Extensions and allow users with Reader to add attachments.
I've been trying to get attachments working in Adobe Reader with Adobe LiveCycle and Adobe Pro myself, but also no luck so far. If anyone can give any workarounds, I'd be very interested in them myself.
Our workaround is to put a JS file in
/c/Program Files (x86)/Adobe/Acrobat DC/Acrobat/Javascripts/
or where ever.
This file has things like
app.PermittedFunction = function(some parameters here)
{
app.beginPriv();
Do fancy stuff here
app.endPriv();
}
app.trustedFunction(app.PermittedFunction)
Then we set button or menu Javascript actions as just
app.PermittedFunction(Generally pass in at least this so the file is clear)
And that should get you around the security errors.

Reader for PDF in iframe

When opening a PDF file that is embedded in an iframe, which PDF viewer is used? Is it the same one that is used when the browser opens a PDF file in a normal way?
Adobe Reader is initiated by the browser when a PDF is requested. Please don't confuse with Adobe Acrobat. The former is free , whereas the latter one is commercial.

Creating, editing and saving pdf file (protected by certificate!) in a webbrowser

I was wondering if it is possible to open a pdf file (located on a web server) in a web browser, edit it and then save it with the changes. Basically what I need is to open, edit and save a certificate protected pdf file in my web browser, without ever having to download a copy to my desktop. The pdf file contains textfields that needs to be filled out with text before saving the changes.
I know that it is possible to view pdf files in a browser, but im unsure if it is possible to edit it when it is protected by a certificate.
What you are asking can be performed in the following methods: First which is the simplest way is to use Adobe Forms server. If you would like to use your own PDF, you will need to extend reader extensions display the form in a frame and perform cross scripting to tell the form to post itself to the server. Note: read Adobe Reader Extension licensing extending reader extension has restriction on usage.
Obviously you can enable reader extension allow user to download edit and upload the file to your server.
Certified forms means you cannot change the form structure but you can fill the form and save it (if it is reader extension enabled)

Is it not possible to print a pdf from a hyperlink?

I have looked for weeks and I keep hitting dead ends. I know you can create a text or image link and tell it to "print page" in a browser. But so far, I can't get it to print a document, specifically a pdf. I would like the print dialog to show after the link is clicked and yes, the pdf linked to has been printed.
Why does this seem to be such an impossible feat? I have seen it work in a Flash movie, but since I cannot access the native file I cannot see how it was done.
Any advice?
Thanks.
Many of today's printers support direct PDF printing. Lexmark, HP, Xerox to name a few all have this on most of the 'business' printers. On these devices simply sending the PDF file directly to the device over LPR, port 9100, or some other mechanism will result in a printed document. Some devices even support URLs. I do know that Lexmark had some devices that a URL could be sent to the printer as as long as it had access to the URL it would pull the document and print. In this case it supported basic HTML, JPEG, TIF, and PDF.
Hope this helps.
A PDF must be rendered as an image before it can be printed. Usually when you're printing a PDF file on your desktop you could simply right-click on the file and select Print and if you have Adobe Reader or an alternative application set as your default PDF viewer, then the PDF that you have selected will be opened automatically -- at this stage the PDF is rendered as an image -- and then the printing process will begin.
But if there is no access to a PDF viewer that can render the PDF and then print it, then you won't be able to print the PDF. Usually if you have Adobe Reader, Foxit Reader, etc, installed then when you click on a URL to a PDF then the PDF will open within the PDF viewer within the browser and you will be able to print it.
Alternatively, you could find a PDF SDK that silently renders a PDF as an image and then sends that to the printer, without the need to have a PDF viewer installed on your machine.