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 the angular platform.
  • aspnetcore - Specifies the aspnetcore platform.
  • aspnetmvc - Specifies the aspnetmvc platform.
  • javascript - Specifies the javascript platform.
  • react - Specifies the react platform.
  • typescript - Specifies the typeScript platform.
  • vue - Specifies the vue platform.