Hi! ^^ I'm trying to print a PDF file without using QPrintDialog, I tried something like this:

Qt Code:
  1. QPrinter printer;
  2. printer.setPrinterName("<printer's name>");
  3.  
  4. QTextDocument document;
  5. document.setHtml("<h2>something</h2>");
  6.  
  7. document.print(&printer);
To copy to clipboard, switch view to plain text mode 

This works fine with a HTML file but I need to use a PDF file. I was looking for a way to wrap a PDF in a QDocument class or something similar but I haven't been successful

Thanks for your help!!!!!