powerjobs_processor:jobprocessor:code_reference:cmdlets:export-document:pdf

PDF

Conversion method: Inventor translator addin
Supported files: .iam, .ipt, .idw, .ipn, .dwg


The Export-Document commandlet uses the “Tranlsator: PDF - Addin” to generate PDF files.
This translator also supports creation of PDF out of 3D-documents but without any settings.

Configuration: Take the following ini as a template:

PDF_2D.ini
[EXPORT SELECT OPTIONS]
Publish_All_Sheets=0
Sheet_Range=14082
Publish_3D_Models=0
Launch_Viewer=0
Password_Protect=0
Password=
Publish_Mode=62723
Enable_Large_Assembly_Mode=0
Enable_Measure=1
Enable_Printing=1
Enable_Markups=1
Enable_Markup_Edits=1
Sheets=Sheet:1 True
Include_Sheet_Tables=0
Sheet_Metal_Flat_Pattern=0
Sheet_Metal_Style_Information=0
Sheet_Metal_Part=1
Weldment_Preparation=0
Weldment_Symbol=0
BOM_Structured=0
BOM_Parts_Only=0
Animations=0
Instructions=0
iAssembly_All_Members=0
iAssembly_3D_Models=0
iPart_All_Members=0
iPart_3D_Models=0
Publish_Component_Props=1
Publish_Mass_Props=1
Include_Empty_Properties=0
Publish_Screenshot=0
Screenshot_DPI=1
Facet_Quality=69379
Force_Facet_Recompute=0
Facet_Recompute_Tolerance=0
Override_Sheet_Color=0
Sheet_Color=1
Custom_Begin_Sheet=1
Custom_End_Sheet=1
All_Color_AS_Black=0
Remove_Line_Weights=0
Vector_Resolution=4800
TranscriptAPICall=0

To enable or disable multisheet PDF generation, the Publish_All_Sheets flag turn on or off.
Additionally you have to change the value of Sheet_Range* to 14082, since this is the value for printing all Sheets, instead of the current sheet.

If a specific sheet range is required, change Sheet_Range to 14083 instead, and specify the starting sheet page via Custom_Begin_Sheet and the end page via Custom_End_Sheet.

Sheet_Range

You can specify if the current sheet, all sheets or a range of sheets should be used for the PDF creation. You have to set the Sheet_Range setting to the respective value.

Value Description
14082 Print all Sheets of the Drawing.
14081 Print the current Sheet in the Drawing.
14083 Print the Sheets specified in a range elsewhere.

Publish_Mode

The publish mode defines what of your document will be printed into the PDF. Per default it is set to print your selected data.

Value Description
62721 Only the current view and the state of the document will be published
62722 The full context of the current document will be published
62723 Only the selected data will be published

Conversion method: DWG TrueView
Supported files: ACAD dwg
Supported target formats: .pdf, .dwf, .dwfx

Unlike the export of Inventor files there are no “.ini” files when exporting AutoCAD files.
DWG TrueView creates a “.dsd” file that contains the export settings.
The settings for this “.dsd” file are read from a “.dwg” file's page settings. Per default powerJobs\Modules\Export\PDF.dwg is used.

With the Export-Document cmdlet you have two ways to manipulate the result of the export.

Using the default page setup of the source drawing

When no configuration file is specified, the default page setup from the AutoCAD file itself will be used.

Using the page setup of a specified drawing

A configuration file can be specified in the -Options parameter. Files of the type “.dwg”, “.dws”, “.dwt” or “.dxf” can be used.

When doing so DWG TrueView will look for a page setup named “AutoloaderModelSetup” for model space configuration and “AutoloaderLayoutSetup” for layout space configuration. They will be converted into a “.dsd” file and used as settings for the export.

Example:

Export-Document -format PDF -To C:\Temp\Test.pdf -Options "$($env:POWERJOBS_MODULESDIR)Export\PDF.dwg"
More information on how to customize PDF creation can be found on our knowledge base.

In order to manipulate the DSD file the settings below can be applied by setting them in the Export Options.
Example:

 Export-Document -format PDF -To C:\Temp\Test.pdf -Options @{'Type'='6'}

Sample.dsd
[DWF6Version]
Ver=1
[DWF6MinorVersion]
MinorVer=1
[DWF6Sheet:migration-Model]
DWG=C:\Temp\migration.dwg\migration.dwg
Layout=Model
Setup=
OriginalSheetPath=C:\Temp\migration.dwg\migration.dwg
Has Plot Port=0
Has3DDWF=0
[DWF6Sheet:migration-Layout1]
DWG=C:\Temp\migration.dwg\migration.dwg
Layout=Layout1
Setup=
OriginalSheetPath=C:\Temp\migration.dwg\migration.dwg
Has Plot Port=0
Has3DDWF=0
[Target]
Type=6
DWF=C:\Temp\migration.dwg\migration.dwg.pdf
OUT=C:\Temp\migration.dwg
PWD=
[MRU Local]
MRU=0
[MRU Sheet List]
MRU=0
[PdfOptions]
IncludeHyperlinks=TRUE
CreateBookmarks=TRUE
CaptureFontsInDrawing=TRUE
ConvertTextToGeometry=FALSE
VectorResolution=1200
RasterResolution=400
[AutoCAD Block Data]
IncludeBlockInfo=0
BlockTmplFilePath=
[SheetSet Properties]
IsSheetSet=FALSE
IsHomogeneous=FALSE
SheetSet Name=
NoOfCopies=1
PlotStampOn=FALSE
ViewFile=FALSE
JobID=0
SelectionSetName=
AcadProfile=<<Unnamed Profile>>
CategoryName=
LogFilePath=
IncludeLayer=FALSE
LineMerge=FALSE
CurrentPrecision=
PromptForDwfName=FALSE
PwdProtectPublishedDWF=FALSE
PromptForPwd=FALSE
RepublishingMarkups=FALSE
PublishSheetSetMetadata=FALSE
PublishSheetMetadata=FALSE
3DDWFOptions=0 1
[PublishOptions]
InitLayouts=TRUE

Type

You can specify which format should be used for the export:

Value Description
0 Export SingleSheet(s) DWF
1 Export MultiSheet DWF
2 Export PlotterPageSetup, plotter named in Page Settings is used for export
3 Export SingleSheet(s) DWFx
4 Export MultiSheet DWFx
5 Export SingleSheet(s) PDF
6 Export MultiSheet PDF