# @embedpdf/plugin-render — ./contract FullPageSettings [InterfaceDeclaration] (from packages/plugin/render/src/paint-plan.ts): export interface FullPageSettings{ maxWidth?: number; quantize?: 'exact' | readonly number[]; } InvalidateOptions [InterfaceDeclaration]: export interface InvalidateOptions{ pages?: readonly (PageRef | number)[]; scope?: InvalidateScope; } InvalidateScope [TypeAliasDeclaration]: export type InvalidateScope = 'content' | 'annotations' | 'fields'; PageImage [TypeAliasDeclaration]: export type PageImage = PageImageHandle; PageLayerOptions [InterfaceDeclaration]: export interface PageLayerOptions{ includeAnnotations?: boolean; includeFormFields?: boolean; } PageRender [InterfaceDeclaration]: export interface PageRender{ readonly page: PageRef; readonly image: PageImage; } PageViewDemand [InterfaceDeclaration] (from packages/plugin/render/src/paint-plan.ts): export interface PageViewDemand{ desiredDeviceWidth: number; visibleRect?: Rect; velocity?:{ dx: number; dy: number} ; } PaintedPicture [InterfaceDeclaration]: export interface PaintedPicture{ update(page: PicturePage): void; destroy(): void; } PicturePage [InterfaceDeclaration]: export interface PicturePage{ readonly ref: PageRef; readonly pageIndex: number; readonly view: string; readonly transform: PageTransform; readonly getViewDemand?: () => PageViewDemand; } PicturePainter [InterfaceDeclaration]: export interface PicturePainter{ paints(view: string): boolean; paint(host: Host, page: PicturePage, report: PictureReport): PaintedPicture; } PictureReport [InterfaceDeclaration]: export interface PictureReport{ shown(): void; failed(error: unknown): void; } PictureState [InterfaceDeclaration]: export interface PictureState{ readonly status: ResourceStatus; readonly slow: boolean; } PictureStateChangedEvent [InterfaceDeclaration]: export interface PictureStateChangedEvent extends PictureState{ readonly page: PageRef; readonly view: string; } RENDER_DEFAULTS [VariableDeclaration]: RENDER_DEFAULTS: RenderSettings ={ fullPage:{ maxWidth: 640, quantize: 'exact'} , tiles:{ size: 512, quantize: 'exact', maxScale: 128, bleedPx: 1, prefetch:{ margin: 0.5, velocityBias: true} , settleMs: 150, } , format: null, quality: null, slowAfterMs: 400, debug: false, snapshot:{ scale: 2, box:{ fill: null, stroke: null} } , } RenderCapability [InterfaceDeclaration]: export interface RenderCapability extends SettingsApi{ canRender(): boolean; canRenderThumbnail(): boolean; renderPage(page: PageRef | number, options?: RenderPageOptions): Promise; renderThumbnail(page: PageRef | number, options?: RenderThumbnailOptions): Promise; renderPages( pages: readonly (PageRef | number)[], options?: RenderPagesOptions, ): Promise>; getRenderPolicy(): EngineRenderPolicy; getRenderEpoch(page: PageRef | number, layers?: PageLayerOptions): number; invalidate(options?: InvalidateOptions): void; readonly onInvalidated: EventHook; getPictureState(page: PageRef | number, view: string): PictureState; readonly onPictureStateChanged: EventHook; handOverPictures(painter: PicturePainter): () => void; getPicturePainter(): PicturePainter | null; canSnapshot(): boolean; getSnapshot(): Snapshot | null; clearSnapshot(): void; readonly onSnapshotChanged: EventHook; } RenderConfig [TypeAliasDeclaration]: export type RenderConfig = DeepPartial; RenderFormat [TypeAliasDeclaration]: export type RenderFormat = NonNullable; RenderInvalidatedEvent [InterfaceDeclaration]: export interface RenderInvalidatedEvent{ readonly pages: readonly PageRef[]; readonly scope: InvalidateScope; readonly origin: EventOrigin | null; } RenderPageOptions [InterfaceDeclaration]: export interface RenderPageOptions extends OperationOptions, PageLayerOptions{ width?: number; scale?: number; rect?: Rect; rotation?: Rotation; format?: RenderFormat; quality?: number; } RenderPagesOptions [InterfaceDeclaration]: export interface RenderPagesOptions extends Omit{ concurrency?: number; } RenderSettings [InterfaceDeclaration]: export interface RenderSettings{ readonly fullPage: FullPageSettings; readonly tiles: TilesSettings | false; readonly format: RenderFormat | null; readonly quality: number | null; readonly slowAfterMs: number; readonly debug: boolean; readonly snapshot: SnapshotSettings; } RenderThumbnailOptions [InterfaceDeclaration]: export interface RenderThumbnailOptions extends OperationOptions, PageLayerOptions{ format?: RenderFormat; quality?: number; } RenderToken [VariableDeclaration] (from packages/plugin/render/src/token.ts): RenderToken = createCapabilityToken('render', { hint: `add renderPlugin() from '@embedpdf/plugin-render' to your plugins list`, promises:{ renderPage: true, renderThumbnail: true, renderPages: true, } , } ) SNAPSHOT_MAX_PIXELS [VariableDeclaration]: SNAPSHOT_MAX_PIXELS = 16_000_000 SNAPSHOT_TOOL [VariableDeclaration]: SNAPSHOT_TOOL = 'snapshot' Snapshot [InterfaceDeclaration]: export interface Snapshot{ readonly page: PageRef; readonly rect: Rect; readonly image: Promise; } SnapshotBoxLook [InterfaceDeclaration]: export interface SnapshotBoxLook{ readonly fill: string | null; readonly stroke: string | null; } SnapshotChangedEvent [InterfaceDeclaration]: export interface SnapshotChangedEvent{ readonly snapshot: Snapshot | null; } SnapshotSettings [InterfaceDeclaration]: export interface SnapshotSettings{ readonly scale: number; readonly box: SnapshotBoxLook; } TilesSettings [InterfaceDeclaration] (from packages/plugin/render/src/paint-plan.ts): export interface TilesSettings{ size?: number; quantize?: 'exact' | readonly number[]; maxScale?: number; bleedPx?: number; engageRatio?: number; prefetch?:{ margin?: number; velocityBias?: boolean; } ; settleMs?: number; } ViewDemandInput [InterfaceDeclaration] (from packages/plugin/render/src/paint-plan.ts): export interface PageViewDemand{ desiredDeviceWidth: number; visibleRect?: Rect; velocity?:{ dx: number; dy: number} ; } samePageViewDemand [FunctionDeclaration] (from packages/plugin/render/src/paint-plan.ts): export function samePageViewDemand(left: PageViewDemand, right: PageViewDemand): boolean{ return ( left.desiredDeviceWidth === right.desiredDeviceWidth && left.velocity?.dx === right.velocity?.dx && left.velocity?.dy === right.velocity?.dy && (left.visibleRect === right.visibleRect || (left.visibleRect !== undefined && right.visibleRect !== undefined && left.visibleRect.x === right.visibleRect.x && left.visibleRect.y === right.visibleRect.y && left.visibleRect.width === right.visibleRect.width && left.visibleRect.height === right.visibleRect.height)) ); }