Skip to content

modern-pdf-lib


modern-pdf-lib / isLinearized

Function: isLinearized()

isLinearized(pdfBytes): boolean

Defined in: src/core/linearization.ts:58

Check if a PDF is linearized.

A linearized PDF has a linearization parameter dictionary as the very first indirect object after the header. This dictionary contains /Linearized as a key.

Parameters

pdfBytes

Uint8Array

The raw PDF bytes.

Returns

boolean

true if the PDF appears to be linearized.

Released under the MIT License.