Closed Bug 2075337 Opened 2 months ago Closed 7 days ago

Sharing a PDF should go through the print processor

Categories

(GeckoView :: PDF Viewer, task, P1)

All
Android
task

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: olivia, Assigned: calixte)

References

(Depends on 1 open bug)

Details

(Whiteboard: [fxdroid][group6])

Attachments

(3 external files)

We want to use the print processor for Sharing so annotations print. This could be as direct as using existing machinery or there might be something we can change in PDF.js.

Implementation in bug 2064727 is byte-for-byte save. Filing the change separately here for ease of review.

Hi Calixte,

I wanted your take for this bug. So, we added a "Share" button to the PDF toolbar. After bug 2064727 lands, it will request the PDF bytes from pdfFileSaver.save() as the item to share.

An option from the "Share" sheet is to "Print". However, annotations do not show up on this print (but are present if the file was reopened). In the meeting it was decided that it made the most sense to print them, especially since we are only supporting the signature annotations in the MVP.

I can fix this on the GV layer by running it through print-to-PDF. However, this seems to take a long time on large jobs since I think it is actually running it through Gecko print machinery.

I wanted your take if this would be best as something adjusted in PDF.js, like if it would be better to expose a annotation flattening mechanism (or however you typically prepare the PDF for printing).

Anyway, please let me know if you think!

Flags: needinfo?(cdenizet)

Yes it's possible to provide a flattened pdf (i.e. a pdf where all the existing or newly added annotations have been flattened).

Assignee: nobody → cdenizet
Status: NEW → ASSIGNED
Flags: needinfo?(cdenizet)
Priority: -- → P1

(via GitHub webhook, authenticated as shared-secret)

Depends on: 2093161

Looks fixed by bug 2093161 to me.

Status: ASSIGNED → RESOLVED
Closed: 7 days ago
Resolution: --- → FIXED

I need to add a quick GV change to resolve the fullstack.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

This patch adds a new argument to GeckoView to request that a saved PDF be flattened.
This change is propagate to AC so "Shared" PDFs will also be flattened.

Pushed by ohall@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/582c11cc80f1 https://hg.mozilla.org/integration/autoland/rev/558aa57238c8 Update GeckoView to support flattening argument r=geckoview-reviewers,android-reviewers,owlish
Status: REOPENED → RESOLVED
Closed: 7 days ago → 7 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: