Skip to content

happypdf / PngEmbedder

Class: PngEmbedder ​

Defined in: src/core/embedders/PngEmbedder.ts:10

A note of thanks to the developers of https://github.com/foliojs/pdfkit, as this class borrows from: https://github.com/devongovett/pdfkit/blob/e71edab0dd4657b5a767804ba86c94c58d01fbca/lib/image/png.coffee

Properties ​

bitsPerComponent ​

ts
readonly bitsPerComponent: number;

Defined in: src/core/embedders/PngEmbedder.ts:16


colorSpace ​

ts
readonly colorSpace: "DeviceRGB";

Defined in: src/core/embedders/PngEmbedder.ts:19


height ​

ts
readonly height: number;

Defined in: src/core/embedders/PngEmbedder.ts:17


width ​

ts
readonly width: number;

Defined in: src/core/embedders/PngEmbedder.ts:18

Methods ​

embedIntoContext() ​

ts
embedIntoContext(context, ref?): Promise<PDFRef>;

Defined in: src/core/embedders/PngEmbedder.ts:31

Parameters ​

ParameterType
contextPDFContext
ref?PDFRef

Returns ​

Promise&lt;PDFRef&gt;


for() ​

ts
static for(imageData): Promise<PngEmbedder>;

Defined in: src/core/embedders/PngEmbedder.ts:11

Parameters ​

ParameterType
imageDataUint8Array

Returns ​

Promise&lt;PngEmbedder&gt;

MIT Licensed. A fork of pdf-lib.