How can I help you?
ImageFormat
6 Feb 20261 minute to read
Public enum for PDF image format.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Initialize a new instance of the `PdfDataExtractor` class
let extractor: PdfDataExtractor = new PdfDataExtractor(document);
// Extract collection of `PdfEmbeddedImage` from the PDF document.
let imageInfoCollection: PdfEmbeddedImage[] = extractor.extractImages({ startPageIndex: 0, endPageIndex: document.pageCount - 1});
Gets the image format.
let imageInfo: PdfEmbeddedImage = imageInfoCollection[0];
let imageFormat: ImageFormat = imageInfo.ImageFormat;
// Destroy the documents
document.destroy();-
jpeg- Gets the Joint Photographic Experts Group (JPEG) image format. -
png- Gets the W3C Portable Network Graphics (PNG) image format. -
unknown- Specifies the unknown image type.