Revit API

Reply
Active Member
joostschlebaum
Posts: 8
Registered: ‎09-30-2010
Message 1 of 2 (290 Views)
Accepted Solution

Printsetup Papersize

290 Views, 1 Replies
11-05-2012 04:33 AM

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.

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
ADN Support Specialist
Joe.Ye
Posts: 328
Registered: ‎03-05-2010
Message 2 of 2 (268 Views)

Re: Printsetup Papersize

11-20-2012 07:31 PM in reply to: joostschlebaum

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


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.