Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

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)