Hi there,
do you someone here know, ho to get pdf from html via WebKit2?
I generate html page from some another sources, and i want to export
pdf from this html. I can generate pdf by another library, but i use
WebKit2, GTK+, resp. cairo, so these libraries are ready to that.
I was study webkit2
Hello,
You can configure WebKit2.PrintOperation with Gtk.PrintSettings, for
example the following script (tested on gjs 1.50.1, Ubuntu 17.10) loads
https://www.gtk.org/ and prints it to /tmp/output.pdf:
```js
#!/usr/bin/gjs
const { Application, ApplicationWindow, PrintSettings } =
imports.gi
Great!
Thank's a lot, but it have one problem, which i must to resolve,
Name of printer is localized, so i must get this printer name from
system. But this could be the way :-)
Ondra
V Wed, 22 Nov 2017 01:36:05 +0200
'-' napsáno:
> Hello,
>
> You can configure WebKit2.PrintOperation with Gtk.