I try to print HtmlViewer content to printer without success. This is my code.
var
Prt : TPrinter;
begin
Prt := Printer;
Prt.BeginDoc;
HtmlViewer.Draw(Prt.Canvas, 0, 500, 500, 500);
Prt.EndDoc;
end;
Found problem in function TGtk2WidgetSet.GetTextMetrics. If fails because IsValidDC returns false.
Printer is working properly from other software. Please help, thanks!