loadImage
Function loadImage
loadImage(pdf: PDFDocument, source: AssetSource): Promise<PDFImage>Embed an image into the PDF, auto-detecting PNG vs JPEG from magic bytes.
Accepts an HTTP URL, a data:image/... URL, a base64 string, raw bytes,
or an ArrayBuffer.
Parameters
-
pdf: PDFDocument -
source: AssetSource
Returns Promise<PDFImage>