09-11-2022
11:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-11-2022
11:32 PM
At the end of your code should be something like this. Sorry if the syntax is not correct.
Parameters oOptions and oContext is passed by its reference. I don't know how it is declared in python.
if PDFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions):
# Options for drawings...
oOptions.Value("All_Color_AS_Black") = 0
# oOptions.Value("Remove_Line_Weights") = 0
# oOptions.Value("Vector_Resolution") = 400
# oOptions.Value("Sheet_Range") = kPrintAllSheets
# oOptions.Value("Custom_Begin_Sheet") = 2
# oOptions.Value("Custom_End_Sheet") = 4
# Set the destination file name
oDataMedium.FileName = "c:\temp\test.pdf"
# Publish document.
PDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)