-
Notifications
You must be signed in to change notification settings - Fork 1.5k
TST: Issue with merging pdfkit #2191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also, I'm very open to better similarity metrics. It is over 99% although there are very important differences (just the amount of pixels being different is low). |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #2191 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 43 43
Lines 7572 7572
Branches 1488 1488
=======================================
Hits 7144 7144
Misses 263 263
Partials 165 165 ☔ View full report in Codecov by Sentry. |
The PR pipeline is passing due to the |
Thanks for explaining @stefan6419846 Just to clarify: I pinged you @Lucas-C because you might have an idea or be interested in the topic. No other reason :-) I'm adding this xfail test (and later an issue) so that it is easier to work on this topic. I'll investigate the PDF generated by PDFkit. Maybe that one is weird. Or maybe the one created by reportlab. |
Just for the record as I have been testing this anyway: This is how it currently renders when running the test as-is: pdfkit_watermarked.png |
When I run
I get: |
## What's new ### Bug Fixes (BUG) - Missing new line in extract_text with cm operations (#2142) by @pubpub-zz - _get_fonts not processing properly CIDFonts and annotations (#2194) by @pubpub-zz ### Documentation (DOC) - Sort list of contributors by @MartinThoma ### Developer Experience (DEV) - Give attribution in release notes (#2196) by @MartinThoma ### Maintenance (MAINT) - Update packages (#2195) by @MartinThoma - Rename PdfWriter.create_viewer_preferences to PdfWriter.create_viewer_preferences (#2190) by @marcstober - Mark `cryptography` as default (#2186) by @exiledkingcc ### Testing (TST) - Issue with merging pdfkit (#2191) by @MartinThoma ### Code Style (STY) - clean-up overriden variable (#2189) by @pubpub-zz [Full Changelog](3.16.0...3.16.1)
So what was the origin of this problem in the end? |
This still has not yet been fixed and is still marked as an expected failure, thus there is no known origin for now. |
I should probably open an issue (@MartinThoma pinging so that I don't forget :-) ) |
I opened #2203 to solve this |
This fixes the issue spotted in #2191 The solution was to re-introduce calls to `PageObject._push_pop_gs()`, in `PageObject._merge_page` & `PageObject._merge_page_writer()`, but to optimize `PageObject._push_pop_gs()` by introducing a `ContentsStream.isolate_graphics_state()` method.
No description provided.