UNPKG

@grapecity/gcpdfviewer

Version:
49 lines (48 loc) 2.13 kB
import { AnnotationBase } from "../Annotations/AnnotationTypes"; import { ProgressDialogSink } from "../Dialogs/Types"; import { SaveSettings, StampCategory, ViewerFeatureName } from "../Models/ViewerTypes"; import { LocalDocumentModification } from "./LocalDocumentModification"; import { OpenDocumentInfo } from "./types"; export interface ISupportApiBase { clientId: string; docInfo: OpenDocumentInfo; documentId: string; isDocumentShared: boolean; isConnected: boolean; supportApiType?: SupportApiType; applyOptions(options: any): void; setViewer(viewer: any): any; canEditAnnotation(annotation?: AnnotationBase | null): boolean; checkDocumentLoader(): Promise<boolean>; cancelTask?(correlationId?: string): Promise<void> | undefined; checkTaskStatus?(correlationId?: string): Promise<TaskStatusAnswer | null>; closeDocumentLoader(): Promise<boolean>; close(): Promise<string>; connect(lazy?: boolean): Promise<boolean>; dispose(): any; getDisabledFeatures(): ViewerFeatureName[] | null; getDownloadUrl(filename: string, format: "PDF" | "PNG" | "SVG" | undefined, correlationId: string): string; getDownloadUnmodifiedUrl(filename: string): string; uploadFiles(fileIds: string[], sink?: ProgressDialogSink): Promise<boolean>; getLastError(): Promise<string>; getStampCategories(): Promise<StampCategory[]>; modify(documentModification: LocalDocumentModification, correlationId: string): Promise<string>; openBinary(data: Uint8Array): Promise<void>; serverVersion(): Promise<string>; setOptions(saveSettings: SaveSettings | undefined, correlationId: string, fileName?: string): Promise<string>; verifySignature(fieldName: string): Promise<boolean>; } export type SupportApiType = "DsPdfWasm" | "WebApi" | "Custom"; export type TaskStatusAnswer = { taskType: ClientTaskType; current?: number; total?: number; done?: boolean; }; export declare enum ClientTaskType { Unspecified = 0, Save = 1, SaveAsImage = 2, SaveAsPng = 3, SaveAsSvg = 4 }