open Document
Opens a PDF document from a Uri. Remote Uri's are supported and automatically downloaded.
Note that this method blocks until the document is loaded and should not be invoked on main thread. If you're passing a remote Uri and run this method on the main thread, it will throw an DownloadException.DownloadOnMainThreadException.
Return
PdfDocument instance if the opening succeeded.
Parameters
Application context.
Uri pointing to the PDF document.
Throws
If file was not opened correctly.
If opening the document failed due to password protection. To specify a password for opening the file, use the openDocument method instead.
If PSPDFKit was not initialized with initialize call.
If trying to open a remote Uri on the main thread
If anything happened during the download of a remote Uri
Opens a PDF document from a Uri. Remote Uri's are supported and automatically downloaded.
Note that this method blocks until the document is loaded and should not be invoked on main thread. If you're passing a remote Uri and run this method on the main thread, it will throw an DownloadException.DownloadOnMainThreadException.
Return
PdfDocument instance if the opening succeeded.
Parameters
Application context.
Uri pointing to the PDF document.
PDF document password, may be null
.
Throws
If file was not opened correctly.
If no password or a wrong password was provided for opening the document.
If PSPDFKit was not initialized with initialize call.
If trying to open a remote Uri on the main thread
If anything happened during the download of a remote Uri
Opens a PDF document from a Uri. Remote Uri's are supported and automatically downloaded.
Note that this method blocks until the document is loaded and should not be invoked on main thread. If you're passing a remote Uri and run this method on the main thread, it will throw an DownloadException.DownloadOnMainThreadException.
Return
PdfDocument instance if opening succeeded.
Parameters
Application context.
DocumentSource describing the source and password of this document.
Throws
If file was not opened correctly.
If PSPDFKit was not initialized with initialize call.
If no password or a wrong password was provided for opening the document.
If the provided contentSignature
does not match the opened document.
If trying to open a remote Uri on the main thread
If anything happened during the download of a remote Uri
Opens a PDF document from a Uri. Remote Uri's are supported and automatically downloaded.
Note that this method blocks until the document is loaded and should not be invoked on main thread. If you're passing a remote Uri and run this method on the main thread, it will throw an DownloadException.DownloadOnMainThreadException.
Return
PdfDocument instance if opening succeeded.
Parameters
Application context.
DocumentSource describing the source and password of this document.
Whether the multithreaded rendering should be enabled when rendering document pages.
Throws
If file was not opened correctly.
If PSPDFKit was not initialized with initialize call.
If no password or a wrong password was provided for opening the document.
If the provided contentSignature
does not match the opened document.
If trying to open a remote Uri on the main thread
If anything happened during the download of a remote Uri