Revit API

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

Printsetup Papersize

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



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.



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.

ADN Support Specialist
Posts: 324
Registered: ‎03-05-2010
Message 2 of 2 (245 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.


Joe Ye
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Revit Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Revit