Closed Bug 1183166 Opened 10 years ago Closed 10 years ago

Provide 'Open In' when viewing PDF's

Categories

(Firefox for iOS :: General, enhancement)

All
iOS
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 1.1+ ---

People

(Reporter: bwalker, Assigned: fluffyemily)

References

Details

(Whiteboard: [parity=chrome][nicetohave])

Attachments

(1 file)

48 bytes, text/x-github-pull-request
bnicholson
: review+
tecgirl
: ui-review+
Details | Review
As a Firefox for iOS user, when I'm viewing a PDF I want to be able to "open in iBooks" so I can save the PDF and access it later.
Summary: from Firefox for iOS PDF viewer, allow user to "open in iBooks" → Provide 'Open In' when viewing PDF's
tracking? so we can get a quick technical investigation and consider aiming for a release.
tracking-fxios: --- → ?
Hardware: Other → All
Flags: needinfo?(sleroux)
So I think this is possible. Here's what we would need to do: 1. Build some native widget with a button that says "Open in iBooks" whenever the WKWebView is displaying a .PDF file. Currently Safari shows this as a toolbar that gets displayed at the top of a page showing a .PDF when the user taps on the screen. 2. When the user taps that button, we save a local copy of the PDF in our cache 3. Using the local file copy, launch iBooks using the itms-books:// url protocol Some details here: http://stackoverflow.com/questions/26343420/open-local-pdf-file-in-ibooks Not sure if this is v1.0 scope though
Flags: needinfo?(sleroux)
What other opening choices do we/should we have?
Whiteboard: parity-chrome
iOS provides a way for applications to register as a document handler by adding applications that can open files as part of the Open in context menu (https://developer.apple.com/library/ios/qa/qa1587/_index.html). I think if we support open in iBooks natively and then use the open in context menu for other applications we don't need to bundle in which applications can open what.
Whiteboard: parity-chrome → parity-chrome, nicetohave
So, the Save PDF in iBooks option comes up automatically when I select the share extensions from FxiOS on my iPhone, but the resulting PDF has only the URL and no content. Looks like we may have to save the pdf locally first to ensure we have the content before sharing...
Assignee: nobody → etoop
Whiteboard: parity-chrome, nicetohave → [parity=chrome][nicetohave][needs strings]
Attached file Pull request
Needs some design love. Made something up as I went along just to get it working
Attachment #8663624 - Flags: feedback?(randersen)
Attachment #8663624 - Flags: feedback?(dhenein)
Status: NEW → ASSIGNED
Comment on attachment 8663624 [details] [review] Pull request So far I can see the "Open in…" but nothing happens when I tap it. http://c.tecgirl.com/dJel Basic styling. http://c.tecgirl.com/dJ1R
Attachment #8663624 - Flags: feedback?(randersen) → feedback-
:tecgirl - What device are you on, running which version of iOS?
Attachment #8663624 - Flags: ui-review?(randersen)
Attachment #8663624 - Flags: review?(bnicholson)
Attachment #8663624 - Flags: feedback?(dhenein)
(In reply to Emily Toop (:fluffyemily) from comment #10) > :tecgirl - What device are you on, running which version of iOS? 6, 9.1
Whiteboard: [parity=chrome][nicetohave][needs strings] → [parity=chrome][nicetohave]
Comment on attachment 8663624 [details] [review] Pull request Looks pretty good overall -- just lots of cleanup comments (many of which you ended up fixing in following commits). Since the follow-up commits are mostly incremental/fixup commits that that revert things in previous commits, I suggest folding them all together to make this easier to review/blame.
Attachment #8663624 - Flags: review?(bnicholson) → feedback+
Attachment #8663624 - Flags: review?(bnicholson)
Attachment #8663624 - Flags: review?(bnicholson)
Comment on attachment 8663624 [details] [review] Pull request Emily, I took another look at this today, same device (6, 9.1) — but this time hosted the .pdf myself rather than trying to view it on dropbox or cl.ly. The error I received when trying from dropbox or cl.ly: > view doesn't have a superview so can't open anything But the "Open in…" button still shows. If I open it from my server, I am able to access the "Copy to" share widget. I am able to "Copy to iBooks" successfully. Yay! I'll + this and open a new bug to cover those instances where the .pdf is embedded, rendering the button useless.
Attachment #8663624 - Flags: ui-review?(randersen) → ui-review+
Blocks: 1208216
Attachment #8663624 - Flags: review?(bnicholson)
Attachment #8663624 - Flags: feedback-
Attachment #8663624 - Flags: feedback+
Comment on attachment 8663624 [details] [review] Pull request Nice, looks good! While testing this, I found some nasty rendering bugs when switching between multiple tabs with PDFs open, but looks like that's a WKWebView bug since it's reproducible in Safari.
Attachment #8663624 - Flags: review?(bnicholson) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: