Hi,

I am using the following code to print an html document.

It works fine except the absolute URL for the image in this document is not printed.

I would use it as a Qt resource but I am trying to make the program more configurable for portability.

Thanks

Qt Code:
  1. QTextStream print(&htmlfile);
  2. QPrinter *printer = new QPrinter(QPrinter::HighResolution);
  3. QString html = print.readAll();
  4. doc.setHtml(html);
  5. printer->setPageSize(QPrinter::A4);
  6. QPrintDialog *printDialog = new QPrintDialog(printer);
  7. if (printDialog->exec() == QDialog::Accepted)
  8. {
  9. doc.print(printer);
  10. }
  11.  
  12. delete printDialog;
  13. delete printer;
To copy to clipboard, switch view to plain text mode