Posted 8 September 2017, 1:49 pm EST
I am using the following code
** Setting PrintInfo Properties of spreadSheet.Sheets **
OwnerPrintDocument printDoc = new OwnerPrintDocument(spreadSheet);
PrintPreviewDialog dlg = new PrintPreviewDialog();
dlg.Document = printDoc;
dlg.Height = 500;
dlg.Width = 500;
The Print Preview Dialog is showing but I have 2 problems.
1. The OwnerPrintDocument respects the PrintInfo.Header and Footer properties (the header and footers show), but other properties like PrintInfo.Orientation are not being reflected in the OwnerPrintDocument (if I set PrintInfo.Orientation to Landscape it still prints in Portrait).
2. The output in the preview is to small. The paper size seems to be correct but It only outputs to a small area in the upper left corner of each page. The header and footer are centered in this printed area. This might be related to issue #1 but I cant seem to find a solution for the problem.
Any help would be greatly appreciated