Page.printToPDF ends up adding extra margins to the document
Categories
(Remote Protocol :: CDP, defect, P3)
Tracking
(firefox114 fixed)
Tracking | Status | |
---|---|---|
firefox114 | --- | fixed |
People
(Reporter: whimboo, Assigned: victoria.o.ajala, Mentored)
References
(Blocks 1 open bug)
Details
(Whiteboard: [lang=js])
User Story
To get started with working on the Remote Protocol check out: https://firefox-source-docs.mozilla.org/remote/index.html
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
(In reply to James Graham [:jgraham] from bug 1616932 comment #0)
Gecko has the concept of the unprintable area, which is effectively a system-specific additional margin added to printed documents by default. I don't think it makes sense to add this to documents generated with the marionette print command since PDFs don't have an unprintable region, and authors should expect the margin to be what they specify and not depend on some other system settings.
We also have to add those preferences to the print to PDF feature of our CDP implementation here:
Updated•4 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Tt means that the referenced code above would require print settings like:
https://searchfox.org/mozilla-central/rev/26790fecfcda622dab234b28859da721b80f3a35/remote/shared/PDF.sys.mjs#120-124
Assignee | ||
Comment 2•2 years ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #1)
Tt means that the referenced code above would require print settings like:
https://searchfox.org/mozilla-central/rev/26790fecfcda622dab234b28859da721b80f3a35/remote/shared/PDF.sys.mjs#120-124
Hello, Can you elaborate on this please?
Assignee | ||
Comment 3•2 years ago
|
||
According to my understanding, the print settings referenced in mozilla-central/remote/shared/PDF.sys.mjs
should be added to mozilla-central/remote/domains/parent/Page.jsm
to print to PDF feature of the CDP implementation If I'm correct
Reporter | ||
Comment 4•2 years ago
|
||
If you compare the settings between both protocols you will notice that the unwritable
margins settings are missing for CDP. Exactly those are needed and have to be added.
Assignee | ||
Comment 5•2 years ago
|
||
Okay, I would attach a patch for this soon
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 8•2 years ago
|
||
bugherder |
Description
•