Thanks again. Your code was helpful although I am still not able to solve my issue. I reduced the margins to the minimum allowed by my printer but the rightmost few characters are still being truncated. Here is my code so far:
sub ShowPrintPreview {
my ($self, $event) = @_;
# Printout class for HTML documents
my $printout = Wx::HtmlEasyPrinting->new("Printing", $htmlwindow);
# Get pointer to PageSetupDialogData instance
my $psd = $printout->GetPageSetupData();
# Set the margins to fit the page
$psd->SetMarginTopLeft([3,3]);
$psd->SetMarginBottomRight([3,3]);
# Preview the text
$printout->PreviewText($htmlcontent);
}
I have tried to use SetFonts to reduce the font sizes on the preview page. The default sizes according to the wxwidgets.org are seven integers in the range -2 to +4. However only the third value, 0 seems to have any effect. When I change this from 0 to -1 the page text becomes too small to be readable. Changes to any of the other values seem to have no effect on the text size. Is there any way to scale the print out to fit a letter size page?