capacitor-pdf-helper
v0.0.5
Published
PDF Helper
Downloads
281
Readme
capacitor-pdf-helper
PDF Helper
Install
npm install capacitor-pdf-helper
npx cap sync
API
open(...)
close()
readPDFAnnotations(...)
getImageListFromResources()
getImageFromAnnotation(...)
getImageFromResources(...)
- Interfaces
open(...)
open(options: IOpenOptions) => Promise<IPHDocumentInfo>
| Param | Type |
| ------------- | ----------------------------------------------------- |
| options
| IOpenOptions |
Returns: Promise<IPHDocumentInfo>
close()
close() => Promise<any>
Returns: Promise<any>
readPDFAnnotations(...)
readPDFAnnotations(forcePdfId: string) => Promise<IPHAnnotation[]>
| Param | Type |
| ---------------- | ------------------- |
| forcePdfId
| string |
Returns: Promise<IPHAnnotation[]>
getImageListFromResources()
getImageListFromResources() => Promise<IPHResourceImage[]>
Returns: Promise<IPHResourceImage[]>
getImageFromAnnotation(...)
getImageFromAnnotation(pidx: number, aidx: number) => Promise<IPHImageMetadata>
| Param | Type |
| ---------- | ------------------- |
| pidx
| number |
| aidx
| number |
Returns: Promise<IPHImageMetadata>
getImageFromResources(...)
getImageFromResources(pidx: number, keyname: string) => Promise<IPHImageMetadata>
| Param | Type |
| ------------- | ------------------- |
| pidx
| number |
| keyname
| string |
Returns: Promise<IPHImageMetadata>
Interfaces
IPHDocumentInfo
| Prop | Type |
| --------------- | ------------------- |
| pdfId
| string |
| pageCount
| number |
IOpenOptions
| Prop | Type |
| --------- | ------------------- |
| url
| string |
IPHAnnotation
| Prop | Type |
| --------------------- | -------------------- |
| docFgId
| string |
| fgId
| string |
| name
| string |
| type
| string |
| contents
| string |
| pageIndex
| number |
| annotationIndex
| number |
| creationDate
| string |
| modifyDate
| string |
| hasImage
| boolean |
| updated
| number |
IPHResourceImage
| Prop | Type |
| --------------- | ------------------- |
| pageIndex
| number |
| keyName
| string |
| metadata
| any |
IPHImageMetadata
| Prop | Type |
| -------------- | ------------------- |
| imageUri
| string |
| mimeType
| string |