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?