Skip to content

IDocumentReader

@scaryterry/pdfium


Defined in: src/core/interfaces.ts:34

Interface for reading PDF documents.

  • Disposable

readonly attachmentCount: number

Defined in: src/core/interfaces.ts:72

Get the number of attachments.


readonly fileVersion: number | undefined

Defined in: src/core/interfaces.ts:57

Get the PDF file version.


readonly pageCount: number

Defined in: src/core/interfaces.ts:36

Get the number of pages in the document.


readonly pageMode: PageMode

Defined in: src/core/interfaces.ts:39

Get the document’s initial page mode.


readonly rawPermissions: number

Defined in: src/core/interfaces.ts:42

Get the raw document permissions bitmask.


readonly securityHandlerRevision: number

Defined in: src/core/interfaces.ts:45

Get the security handler revision.

[dispose](): void

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts:36

void

Disposable.[dispose]


attachments(): IterableIterator<PDFAttachment>

Defined in: src/core/interfaces.ts:78

Iterate over attachments.

IterableIterator<PDFAttachment>


bookmarks(): IterableIterator<Bookmark>

Defined in: src/core/interfaces.ts:69

Iterate over bookmarks.

IterableIterator<Bookmark>


getAttachment(index): PDFAttachment

Defined in: src/core/interfaces.ts:75

Get an attachment by index.

ParameterType
indexnumber

PDFAttachment


getAttachments(): PDFAttachment[]

Defined in: src/core/interfaces.ts:81

Get all attachments.

PDFAttachment[]


getBookmarks(): Bookmark[]

Defined in: src/core/interfaces.ts:66

Get the bookmark tree.

Bookmark[]


getMetadata(): DocumentMetadata

Defined in: src/core/interfaces.ts:51

Get all standard metadata fields.

DocumentMetadata


getMetaText(tag): string | undefined

Defined in: src/core/interfaces.ts:54

Get a specific metadata field.

ParameterType
tagstring

string | undefined


getNamedDestinationByName(name): NamedDestination | undefined

Defined in: src/core/interfaces.ts:87

Get a named destination by name.

ParameterType
namestring

NamedDestination | undefined


getNamedDestinations(): NamedDestination[]

Defined in: src/core/interfaces.ts:84

Get all named destinations.

NamedDestination[]


getPage(pageIndex): IPageReader

Defined in: src/core/interfaces.ts:60

Load a specific page.

ParameterType
pageIndexnumber

IPageReader


getPermissions(): DocumentPermissions

Defined in: src/core/interfaces.ts:48

Get structured document permissions with named boolean fields.

DocumentPermissions


pages(): IterableIterator<IPageReader>

Defined in: src/core/interfaces.ts:63

Iterate over all pages.

IterableIterator<IPageReader>


save(options?): Uint8Array

Defined in: src/core/interfaces.ts:90

Save the document.

ParameterType
options?SaveOptions

Uint8Array