Sign up

dlang binding for PDF render

Are there any dlang bindings for a PDF renderer (like poppler or pdfium) that can display in a gtkd app?

(BTW, really glad this forum is working again)

Re: dlang binding for PDF render

On Fri, 19 Apr 2019 17:10:05 GMT, Chris Bare wrote:

Are there any dlang bindings for a PDF renderer (like poppler or pdfium) that can display in a gtkd app?

(BTW, really glad this forum is working again)

You might check out PdfSurface.d in the wrapper code files.

Re: dlang binding for PDF render

On Fri, 19 Apr 2019 19:42:55 GMT, Ron Tarrant wrote:

On Fri, 19 Apr 2019 17:10:05 GMT, Chris Bare wrote:

Are there any dlang bindings for a PDF renderer (like poppler or pdfium) that can display in a gtkd app?

(BTW, really glad this forum is working again)

You might check out PdfSurface.d in the wrapper code files.

Thanks, I've run across that before, but it works in the opposite direction. It generates a pdf file from something created with cairo. I'm looking for a way to display an existing pdf.

Re: dlang binding for PDF render

On 19-04-2019 19:10, Chris Bare wrote:

Are there any dlang bindings for a PDF renderer (like poppler or pdfium) that can display in a gtkd app?

(BTW, really glad this forum is working again)

You can use the cairo.PpfSurface Ron recommended to render a Pdf to a
cairo surface to display with something like a gtk.DrawingArea.

For Poppler you could try generating a binding with gir-to-d:
https://github.com/gtkd-developers/gir-to-d

girtod -i Poppler-0.18.gir

You will need the latest commit on master to generate something that
compiles.

(Dit you have a lot of problems with the forum? I know of two instances
of downtime this year. One time where a update of MongoDB broke the
forum. And one time where the server was unresponsive and needed a
forced reboot)