Start a new topic

Multiple PDF's from a multi sheet Inventor

I have a customer using PowerJobs, for PDF's creation,

they want their PDF's from Inventor multi Sheet drawings to come out as individual PDF's


ie:  drawingsample.idw  (has 3 sheets)

Published PDF's:   drawingsample.01.pdf

                               drawingsample.02.pdf

                               drawingsample.03.pdf


is that possible using the export with PowerJobs?


Regards,

Kim Hendrix

1 Comment

Hallo Kim,

you can do this either with the "ExcludeFromPrinting" Property of the sheet or by modifying the export configuration on the fly. If you choose the config way you have to set the Sheet_Range to 14083 which means that a range of sheets is printed and not all of them. You also have to define the start and end sheet.


The sample was tested with Powershell 5. It is not a finished job and should only demonstrate how to modify the necessary settings on the fly.

 

#...
if($openResult) {
    $configFile = "$($env:POWERJOBS_MODULESDIR)Export\PDF_2D.ini"
    $Document = $openResult.Document.Instance

    for($i=1; $i -le $Document.Sheets.Count; $i++) {
        $exportResult = Export-Document -Format 'PDF' -To "C:\TEMP\sheet$($i).pdf" -Options $configFile -OnExport {
        param($export)
            $export.Options["Sheet_Range"] = 14083
            $export.Options["Custom_Begin_Sheet"] = $i
            $export.Options["Custom_End_Sheet"] = $i
        }
    }
    $closeResult = Close-Document
}
#...

 

Best regards,

Thomas

Login or Signup to post a comment