WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
262156
PDF.js UI is printed when printing a PDF document
https://bugs.webkit.org/show_bug.cgi?id=262156
Summary
PDF.js UI is printed when printing a PDF document
Michael Catanzaro
Reported
2023-09-26 17:36:22 PDT
When printing a PDF document, WebKit should integrate with PDF.js's print functionality and not print the PDF.js UI itself.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2023-09-26 17:39:25 PDT
(In reply to Michael Catanzaro from
comment #0
)
> When printing a PDF document
Specifically, the problem occurs when printing the document using the browser's print UI rather than PDF.js's print UI. Presumably it wouldn't happen if using the print button in PDF.js itself. That button is actually broken, but it looks like
bug #260771
, so I'll expand the scope of that bug instead of reporting a new one.
Radar WebKit Bug Importer
Comment 2
2023-10-03 17:37:16 PDT
<
rdar://problem/116435714
>
Tim Nguyen (:ntim)
Comment 3
2023-10-08 11:10:59 PDT
I would suggest as a starter to use `@media (print)` in the custom stylesheets to make printing behave as expected + somehow force the print button to load all the PDF pages. Alternatively, there might be a better way if you somehow use messaging + PDF.JS APIs to print.
Michael Catanzaro
Comment 4
2023-10-09 05:45:15 PDT
(In reply to Tim Nguyen (:ntim) from
comment #3
)
> Alternatively, there might be a better way if you somehow use messaging + > PDF.JS APIs to print.
This will be a better (and probably easier) solution. Basically we should forward WebKit's print command to PDF.js, which knows how to prepare the document properly.
Tim Nguyen (:ntim)
Comment 5
2023-10-09 19:57:14 PDT
(In reply to Michael Catanzaro from
comment #4
)
> (In reply to Tim Nguyen (:ntim) from
comment #3
) > > Alternatively, there might be a better way if you somehow use messaging + > > PDF.JS APIs to print. > > This will be a better (and probably easier) solution. Basically we should > forward WebKit's print command to PDF.js, which knows how to prepare the > document properly.
You can look at how the custom context menu commands are handled for messaging to PDF.JS.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug