Repository navigation
[api-minor] Support annotation flattening in extractPages (bug 2075337) - #22448
calixteman wants to merge 4 commits into
Conversation
Viewer previewCommit b9e993a (build logs).
Previews are removed when the PR closes and may be pruned after 30 days without an update. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22448 +/- ##
==========================================
+ Coverage 90.57% 90.63% +0.06%
==========================================
Files 276 277 +1
Lines 68671 69314 +643
==========================================
+ Hits 62197 62824 +627
- Misses 6474 6490 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 13.7%
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
cf1e113 to
7850e82
Compare
Add flatten and intent options to draw supported annotation appearances into page content. Use print or display visibility. Keep the widgets and the interactive annotations. Android 14's PdfRenderer calls PDFium without FPDF_ANNOT [1]. [1] https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/libs/hwui/jni/pdf/PdfRenderer.cpp
With `flatten: true`, also draw the widgets, generating their appearances from the stored values, and remove the ones hidden for the intent. Prune the removed fields from the AcroForm, and remove it when no page widget remains, unless it declares signatures. Add a "non-forms" value to keep the form fields.
In a flat parent tree, replace the OBJR of a flattened annotation with a marked-content reference to its drawing in the page content. For other readable parent trees, only remove the OBJR.
Reuse the save path to flatten extracted pages. Remap pending form edits to copied annotations and reload with the encryption source's password. Rebuild the PDF to discard the unflattened revision.
7850e82 to
b9e993a
Compare
Reuse the save path to flatten extracted pages. Remap pending form edits to copied annotations and reload with the encryption source's password. Rebuild the PDF to discard the unflattened revision.