When creating PDFs from AutoCAD drawings with powerJobs a lot of the time the paper size is incorrect with the default configuration. 


The reason for this is that the paper size needs to be set in the setup DWG that is used by powerJobs to get some of the export settings. 


Which setup DWG is used is defined in the script in the -Options parameter of the Export-Document commandlet. In order to handle differently sized drawings you have to create multiple setup DWGs. One for each paper size. A setup dwg is just a normal DWG with configured page setup. The attached powershell script demonstrates one way to handle this in a job. 

  • In order for this approach to work you will need a Vault property that contains the paper size
  • The function GetAutoCADSetupFile builds a path to the matching setup DWG, based on the paper size that is passed into it. For demonstration purposes A4 portrait and A3 landscape are defined


You can use the Vault property mappings to get the paper size into Vault. Then you can either fill it manually or change your template files so they contain the drawing size.