Load Password-Protected Documents
Leave feedback
On this page
GroupDocs.Comparison for Python via .NET can compare password-protected documents. Supply the source password through a LoadOptions instance when constructing the Comparer, and the target password through a separate LoadOptions when calling add().
from groupdocs.comparison import Comparer
from groupdocs.comparison.options import LoadOptions
def load_password_protected_documents():
source_load = LoadOptions()
source_load.password = "1234"
target_load = LoadOptions()
target_load.password = "5678"
with Comparer("./source_protected.docx", source_load) as comparer:
comparer.add("./target_protected.docx", target_load)
comparer.compare("./result.docx")
if __name__ == "__main__":
load_password_protected_documents()
source_protected.docx is a password-protected source file. Click here to download it.
target_protected.docx is a password-protected target file. Click here to download it.
Binary file (DOCX, 24 KB)
- Compare multiple password-protected documents — extend the same pattern to several targets.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.