Revit API

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

Printsetup Papersize

322 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: 334
Registered: ‎03-05-2010
Message 2 of 2 (300 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.