canvas icon indicating copy to clipboard operation
canvas copied to clipboard

any way to take a gio canvas and render it to PDF ?

Open gedw99 opened this issue 4 years ago • 4 comments

Looking for ways to take the gio canvas and then export it as a PDF.

Because the Canvas is rendering engine "agnostic" then maybe it's possible ?

The reason i ask is because then i can print to a printer with gio

gedw99 avatar Oct 31 '21 11:10 gedw99

Currently you can build up a canvas and display this inside Gio (or send it to a PDF renderer). Or do you want the reverse, where you draw stuff within Gio (without using this library), and then pipe that into this library to export a PDF. The last case is not possible (but not impossible), but the first case is fairly simply: use Canvas to build up your frame, then pipe that to the Gio renderer to display within Gio, while also piping to the PDF renderer to export a PDF.

tdewolff avatar Nov 01 '21 21:11 tdewolff

I want to build a gio canvas that I display to the user.

then if they click “Print” I want to pipe that to pdf.

The pdf will probably be held in memory but not fully sure yet cause different print preview systems work a bit differently per OS it seems.

the pdf will then be used to interact with a gio native package that enables printing to a printer via the print preview dialogue that is native on each OS.

it’s here : https://github.com/gedw99/gio-print

still under construction :)

gedw99 avatar Nov 03 '21 18:11 gedw99

Nice work! Looks interesting, let me know if you need any help ;-)

tdewolff avatar Nov 03 '21 21:11 tdewolff

thanks. Will yell when i get to the pipelining aspects if i get stuck.

gedw99 avatar Nov 07 '21 21:11 gedw99