# @embedpdf/plugin-render — ./contract/host AppearanceFamily [TypeAliasDeclaration]: export type AppearanceFamily = 'annotations' | 'widgets'; AppearanceItem [InterfaceDeclaration]: export interface AppearanceItem{ readonly ref: AnnotationRef; readonly version: number; } AppearancePicture [InterfaceDeclaration]: export interface AppearancePicture extends AnnotationAppearanceImage{ readonly version: number; } AppearancesOptions [InterfaceDeclaration]: export interface AppearancesOptions extends OperationOptions{ readonly family: AppearanceFamily; readonly scale: number; readonly items: readonly AppearanceItem[]; } FullPageSettings [InterfaceDeclaration] (from packages/plugin/render/src/paint-plan.ts): export interface FullPageSettings{ maxWidth?: number; quantize?: 'exact' | readonly number[]; } InvalidateOptions [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface InvalidateOptions{ pages?: readonly (PageRef | number)[]; scope?: InvalidateScope; } InvalidateScope [TypeAliasDeclaration] (from packages/plugin/render/src/contract.ts): export type InvalidateScope = 'content' | 'annotations' | 'fields'; OpenPictureReport [InterfaceDeclaration]: export interface OpenPictureReport extends PictureReport{ close(): void; } PageImage [TypeAliasDeclaration] (from packages/plugin/render/src/contract.ts): export type PageImage = PageImageHandle; PageLayerOptions [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface PageLayerOptions{ includeAnnotations?: boolean; includeFormFields?: boolean; } PageRender [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): 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} ; } PaintSettings [InterfaceDeclaration]: export interface PaintSettings{ readonly tiles: boolean; } PaintedPicture [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface PaintedPicture{ update(page: PicturePage): void; destroy(): void; } PicturePage [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface PicturePage{ readonly ref: PageRef; readonly pageIndex: number; readonly view: string; readonly transform: PageTransform; readonly getViewDemand?: () => PageViewDemand; } PicturePainter [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface PicturePainter{ paints(view: string): boolean; paint(host: Host, page: PicturePage, report: PictureReport): PaintedPicture; } PictureReport [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface PictureReport{ shown(): void; failed(error: unknown): void; } PictureState [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface PictureState{ readonly status: ResourceStatus; readonly slow: boolean; } PictureStateChangedEvent [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface PictureStateChangedEvent extends PictureState{ readonly page: PageRef; readonly view: string; } RENDER_DEFAULTS [VariableDeclaration] (from packages/plugin/render/src/contract.ts): 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] (from packages/plugin/render/src/contract.ts): 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; } RenderCompletedEvent [InterfaceDeclaration]: export interface RenderCompletedEvent{ readonly page: PageRef; readonly key: string; } RenderConfig [TypeAliasDeclaration] (from packages/plugin/render/src/contract.ts): export type RenderConfig = DeepPartial; RenderFailedEvent [InterfaceDeclaration]: export interface RenderFailedEvent{ readonly page: PageRef; readonly key: string; readonly error: PluginErrorInfo; } RenderFormat [TypeAliasDeclaration] (from packages/plugin/render/src/contract.ts): export type RenderFormat = NonNullable; RenderHostCapability [InterfaceDeclaration]: export interface RenderHostCapability extends RenderCapability{ renderSource(page: PageRef, options: RenderSourceOptions & OperationOptions): Promise; getSourceKey(page: PageRef, options: RenderSourceOptions): string; conformViewport(page: PageRef, scale: number): PageRenderViewport; getPaintSettings(): PaintSettings; getLayerRights(): PageLayerRights; createViewDemand(viewId: string): ViewDemand; reportPicture(view: string, page: PageRef): OpenPictureReport; renderAppearances( page: PageRef, options: AppearancesOptions, ): Promise; getKeptAppearances(family: AppearanceFamily, item: AnnotationRef): readonly AppearancePicture[]; getAppearanceScale(renderScale: number): number; readonly onRenderCompleted: EventHook; readonly onRenderFailed: EventHook; getSnapshotBox(page: PageRef): Rect | null; } RenderInvalidatedEvent [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface RenderInvalidatedEvent{ readonly pages: readonly PageRef[]; readonly scope: InvalidateScope; readonly origin: EventOrigin | null; } RenderPageOptions [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface RenderPageOptions extends OperationOptions, PageLayerOptions{ width?: number; scale?: number; rect?: Rect; rotation?: Rotation; format?: RenderFormat; quality?: number; } RenderPagesOptions [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface RenderPagesOptions extends Omit{ concurrency?: number; } RenderSettings [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): 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; } RenderSourceOptions [InterfaceDeclaration]: export interface RenderSourceOptions extends PageLayerOptions{ scale: number; thumbnail?: boolean; view?: string; } RenderThumbnailOptions [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface RenderThumbnailOptions extends OperationOptions, PageLayerOptions{ format?: RenderFormat; quality?: number; } RenderToken [VariableDeclaration]: RenderToken = createHostToken(PublicRenderToken) SNAPSHOT_MAX_PIXELS [VariableDeclaration] (from packages/plugin/render/src/contract.ts): SNAPSHOT_MAX_PIXELS = 16_000_000 SNAPSHOT_TOOL [VariableDeclaration] (from packages/plugin/render/src/contract.ts): SNAPSHOT_TOOL = 'snapshot' Snapshot [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface Snapshot{ readonly page: PageRef; readonly rect: Rect; readonly image: Promise; } SnapshotBoxLook [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface SnapshotBoxLook{ readonly fill: string | null; readonly stroke: string | null; } SnapshotChangedEvent [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface SnapshotChangedEvent{ readonly snapshot: Snapshot | null; } SnapshotSettings [InterfaceDeclaration] (from packages/plugin/render/src/contract.ts): export interface SnapshotSettings{ readonly scale: number; readonly box: SnapshotBoxLook; } TilePaintPlan [InterfaceDeclaration] (from packages/plugin/render/src/paint-plan.ts): export interface TilePaintPlan{ engaged: boolean; paint: TilePaintSource[]; fetching: string[]; stamp: string; } TilePaintSource [InterfaceDeclaration] (from packages/plugin/render/src/paint-plan.ts): export interface TilePaintSource{ key: string; scale: number; rect: Rect; z: number; handle: PageImageHandle; } 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; } ViewDemand [InterfaceDeclaration]: export interface ViewDemand{ setDemand(page: PageRef, demand: PageViewDemand, options?: PageLayerOptions): void; getPlan(page: PageRef): TilePaintPlan; markPainted(page: PageRef, key: string): void; markUnpainted(page: PageRef, key: string): void; release(page: PageRef): void; destroy(): void; } 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)) ); }