Open PDF document programmatically

Open existing PDF document

There are several ways to open a document. The easiest is to specify a file name.


    import AsposePDFPythonWrappers as ap
    # Open document
    document = ap.Document("sample.pdf")
    count = document.pages.count()
    print("Pages: " + str(count))

Open encrypted PDF document


    import AsposePDFPythonWrappers as ap
    # Open document
    document = ap.Document("sample.pdf","password")
    count = document.pages.count()
    print("Pages: " + str(count))