I've been trying to enable printing on an application, and it's been going rather awry.
I went from attempting to use wxHtmlEasyPrinting, and then through all kinds of other classes covered in the printing overview documentation, all with bad results...
Will start at the beginning.
The code to execute printing was as follows:
Code: Select all
Printer.PreviewFile(wxT("Test.html"));
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title>Label</title>
</head>
<body>
<img style="width: 320px; height: 60px;" alt="Picture?"
src="Test.jpg">
</body>
</html>
However, print-preview (And print) claim that the algorithm fails to calculate page count and gives up at 1000 pages.
Related to that problem is my second question, How do I set the paper type when it isn't on the list for wxPaperSize ? I am trying to save the settings set by the user...
The printer in question is a Brother QL-570, which is incapable of standard paper sizes, and has a big list of other paper sizes. The paper size I'm using is 27mm x 89mm, with 300 DPI is more then enough to print the requested image... I've tried printing with more manual means in wxPrintout, but even though it works, the printout becomes incredibly fuzzy and unreadable. =(