-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
print: Add "supported_output_file_formats" option #1322
print: Add "supported_output_file_formats" option #1322
Conversation
7f68103
to
1e472cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems very reasonable to me.
I assume this will need a corresponding gtk change to say that we only do pdf ? |
Looks fine to me too |
No. I actually thought so, and started looking at GtkPrintOperation - but realized soon enough that, actually, GtkPrintOperation is good and respect the output file format, it uses cairo-pdf for PDF, cairo-ps for PostScript, and plain cairo for SVG. |
This allows applications tell portal backends which file formats they support. In turn, portal backends can then limit the choices presented to the user.
1e472cd
to
9b05b7b
Compare
I think this is fine from Qt POV, my understanding is that it can only print to PDF. |
https://bugs.webkit.org/show_bug.cgi?id=272913 Reviewed by Michael Catanzaro and Carlos Garcia Campos. Skia only supports printing to PDF files, but the Print portal assumes that apps can print to PDF, PS, and SVG formats. If the user selects PS or SVG through the Print portal dialog, and WebKit is using Skia, we hit an assertion failure. The next release of XDG Desktop Portal has new API [1] in the Print portal made specifically to aid this, we can use it for Skia builds and if the portal version matches. [1] flatpak/xdg-desktop-portal#1322 * Source/WebKit/UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationPreparePrint): Canonical link: https://commits.webkit.org/277806@main
This allows applications tell portal backends which file formats they
support. In turn, portal backends can then limit the choices presented
to the user.