Hello,
I'm trying to create some sort of PDF printing app and it's working quite okay, except there is one issue. I cannot find how to change the PaperSize.
Example:
PrintManager pm = activeDoc.PrintManager; pm.PrintSetup.CurrentPrintSetting.PrintParameters.PaperPlacement = PaperPlacementType.Center; pm.PrintSetup.CurrentPrintSetting.PrintParameters.ZoomType = ZoomType.Zoom; pm.PrintSetup.CurrentPrintSetting.PrintParameters.PaperSize = ????;
How can I set my PaperSize? Is it possible to use an Equals string function?
Thank you in advance.
Solved! Go to Solution.
Solved by Joe.Ye. Go to Solution.
You can get all available paper size for the current PrintManager by PrintManager.PaperSizes. Then go through the collection of the returned PaperSize objects, find your target one.
Then assign the target PaperSize object to PaperSize property.
pm.PrintSetup.CurrentPrintSetting.PrintParameters.PaperSize