How to print an existing PDF using Poppler (Qt5)?

5

I'm using Poppler for Qt5, but I've reviewed the API documentation to read existing PDF documents, I need to put the functionality of send to printer, but I have no idea where to start, the most I did was this (read the PDF):

QString filename = "c:/exemplos/meupdf.pdf";
Poppler::Document* document = Poppler::Document::load(filename);

And to print the existing PDF document, the only thing I could imagine I could do is copy the PDF to an image and print it later:

QImage image = pdfPage->renderToImage(xres, yres, x, y, width, height);

But this really seems like a lot of work, I'd like to know, is there any way I can do this using Poppler::Document + QPrinter , or anything other than save as image?     

asked by anonymous 09.01.2017 / 21:28

0 answers