On this page
Open Document
Method: openDocument(document : string, password : string, configuration : string)
Used to present a PDF document.
Parameters:
Name | Type | Description |
---|---|---|
document | string | The path to the PDF document to be presented. |
password | string | PDF document password. |
configuration | string | Configuration objects to customize the appearance and behavior of ComPDFKit. |
- (Android) For local storage file path:
tsx
document = '/storage/emulated/0/Download/PDF_document.pdf'
ComPDFKit.openDocument(document, '', ComPDFKit.getDefaultConfig({}))
- (Android) For content Uri:
tsx
document = 'content://...'
ComPDFKit.openDocument(document, '', ComPDFKit.getDefaultConfig({}))
- (Android) For assets path:
tsx
document = "file:///android_asset/..."
ComPDFKit.openDocument(document, '', ComPDFKit.getDefaultConfig({}))
- (iOS) For app bundle file path:
tsx
document = 'pdf_document.pdf'
ComPDFKit.openDocument(document, '', ComPDFKit.getDefaultConfig({}))