Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Printsetup Papersize

1 REPLY 1
SOLVED
Reply
Message 1 of 2
joostschlebaum
1025 Views, 1 Reply

Printsetup Papersize

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.

1 REPLY 1
Message 2 of 2
Joe.Ye
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community