ApplicationPlatform
6 Feb 20261 minute to read
Represents the application platform type.
```typescript
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Define a canvas render callback that returns a canvas element and the application platform.
const canvasRenderCallback = (): {canvas: any, applicationPlatform: ApplicationPlatform} => {
const canvas = document.createElement(‘canvas’);
return { canvas: canvas, applicationPlatform: ApplicationPlatform.vue };
};
// Initialize a new instance of the PdfDataExtractor class
let extractor: PdfDataExtractor = new PdfDataExtractor(document, callBack: canvasRenderCallback);
// Extract collection of PdfEmbeddedImage from the PDF document.
let imageInfoCollection: PdfEmbeddedImage[] = extractor.extractImages({ startPageIndex: 0, endPageIndex: document.pageCount - 1});
let imageInfo: PdfEmbeddedImage = imageInfoCollection[0];
let data: Uint8Array = imageInfo.data;
// Destroy the documents
document.destroy();
-
angular- Specifies theangularplatform. -
aspnetcore- Specifies theaspnetcoreplatform. -
aspnetmvc- Specifies theaspnetmvcplatform. -
javascript- Specifies thejavascriptplatform. -
react- Specifies thereactplatform. -
typescript- Specifies thetypeScriptplatform. -
vue- Specifies thevueplatform.