PrintAlignmentMiddleCenter prints right at the left
Posted: Fri Sep 04, 2009 1:03 pm
Hello,
I have an issue that I cannot resolve is this a bug with the GdViewer or am I doing something wrong?
I set the print alignment to PrintAlignmentMiddleCenter but when it prints the print is right at the left... vertically it is in the center but horizontally it is at the absolute left of the page.
I'm also having an issue with the PrintFit() which seems to be sizing the print to portrait regardless of whether it is landscape or portrait (so if I print to landscape the print does come out the printer landscape but the page printed is sized to fit portrait so is narrower than the landscape page and taller).
Are these bugs or am I doing something incorrectly?
Thanks,
Phil
gdViewer1.DisplayFromFile(path);
gdViewer1.PrintSetAlignment(PrintAlignment.PrintAlignmentMiddleCenter);
gdViewer1.PrintSetFromToPage(1, gdViewer1.PageCount);
gdViewer1.PrintSetActivePrinter(printerSettings.PrinterName);
gdViewer1.PrintSetDocumentName(batchPrintAttachmentInfo.Name);
gdViewer1.PrintSetCopies(printerSettings.Copies);
gdViewer1.PrintSetColorMode(printerSettings.DefaultPageSettings.Color ? PrinterColorMode.PrinterColorModeColor : PrinterColorMode.PrinterColorModeGray);
gdViewer1.PrintSetOrientation(printerSettings.DefaultPageSettings.Landscape ? PrinterOrientation.PrinterOrientationLandscape : PrinterOrientation.PrinterOrientationPortrait);
gdViewer1.PrintSetDuplexMode(printerSettings.Duplex);
gdViewer1.PrintSetStdPaperSize(printerSettings.DefaultPageSettings.PaperSize.RawKind);
gdViewer1.PrintSetPaperBin(printerSettings.DefaultPageSettings.PaperSource.RawKind);
gdViewer1.PrintFit();
I have an issue that I cannot resolve is this a bug with the GdViewer or am I doing something wrong?
I set the print alignment to PrintAlignmentMiddleCenter but when it prints the print is right at the left... vertically it is in the center but horizontally it is at the absolute left of the page.
I'm also having an issue with the PrintFit() which seems to be sizing the print to portrait regardless of whether it is landscape or portrait (so if I print to landscape the print does come out the printer landscape but the page printed is sized to fit portrait so is narrower than the landscape page and taller).
Are these bugs or am I doing something incorrectly?
Thanks,
Phil
gdViewer1.DisplayFromFile(path);
gdViewer1.PrintSetAlignment(PrintAlignment.PrintAlignmentMiddleCenter);
gdViewer1.PrintSetFromToPage(1, gdViewer1.PageCount);
gdViewer1.PrintSetActivePrinter(printerSettings.PrinterName);
gdViewer1.PrintSetDocumentName(batchPrintAttachmentInfo.Name);
gdViewer1.PrintSetCopies(printerSettings.Copies);
gdViewer1.PrintSetColorMode(printerSettings.DefaultPageSettings.Color ? PrinterColorMode.PrinterColorModeColor : PrinterColorMode.PrinterColorModeGray);
gdViewer1.PrintSetOrientation(printerSettings.DefaultPageSettings.Landscape ? PrinterOrientation.PrinterOrientationLandscape : PrinterOrientation.PrinterOrientationPortrait);
gdViewer1.PrintSetDuplexMode(printerSettings.Duplex);
gdViewer1.PrintSetStdPaperSize(printerSettings.DefaultPageSettings.PaperSize.RawKind);
gdViewer1.PrintSetPaperBin(printerSettings.DefaultPageSettings.PaperSource.RawKind);
gdViewer1.PrintFit();