Summary: | [GTK][META] Add printing support to WebKit2 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> |
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW --- | ||
Severity: | Normal | CC: | bugs-noreply, gustavo, mrobinson, noein93, xan.lopez |
Priority: | P2 | Keywords: | Gtk |
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Linux | ||
Bug Depends on: | 79226, 76172, 76448, 76536, 76616, 77197, 78715, 78793, 78799, 78805, 78823 | ||
Bug Blocks: |
Description
Carlos Garcia Campos
2012-01-04 06:58:59 PST
Hrm. The issue with just passing a bitmap here is that we'd like to render onto a PDF surface, right? Right, we can't use bitmaps, the surface created by GtkPrintOperation might be pdf or ps when using cups, ps when using papi and lpr, pdf, ps or svg when printing to a file and win32 printing surface in windows. Another solution might be to run the print dialog in the web process like we currently do for auth dialogs. I don't like the idea but it might work. Chromium uses GtkPrintUnixDialog + GtkPrintJob in unix FWIW. For the record, I'm pro the creation of the dialog in the UI process with the settings then piped through the IPC to the web process for the actual printing, like Carlos proposed, and with the creation of the WebKitPrintOperation object. Yes, the idea is to use GtkPrintDialogUnix in the UI process, without exposing it in the API, using WebKitPrintOperation, the same way GtkPrintOperation does. This way someone could add win32 support using the window native printing dialog, using the same API. This object will run the dialog and send the print settings and page setup to the web process thought IPC. In the web process a GtkPrintJob object will be created using the print settings. GtkPrintJob creates the cairo surface using gtk printing backends. Then the frame is rendered into the printing surface and the job sent to the printer. This is the general ideal for the basic functionality. Making this a meta bug since I'm going to split the work into several patches: - Initial printing support in WebProcess - Initial API - Manual capabilities (copies, collate, reverse, multiple pages per sheet, scale, etc.). Maybe using a different bug per capability. |