@@ -35,12 +35,7 @@ import {
3535 setAnnotations ,
3636 setToolDefaults ,
3737} from "./actions"
38- import type {
39- AnnotationEvent ,
40- GetPageAnnotationsOptions ,
41- RenderAnnotationOptions ,
42- TrackedAnnotation ,
43- } from "./custom-types"
38+ import type { AnnotationEvent , GetPageAnnotationsOptions , TrackedAnnotation } from "./custom-types"
4439import { getSelectedAnnotation } from "./selectors"
4540import type { AnnotationState } from "./state"
4641import type { AnnotationTool } from "./tools/annotation-tool"
@@ -85,7 +80,6 @@ export interface AnnotationCapability {
8580 annotationId : string ,
8681 patch : Partial < PdfAnnotationObject > ,
8782 ) => void
88- renderAnnotation : ( options : RenderAnnotationOptions ) => Task < Blob , PdfErrorReason >
8983}
9084
9185// ***PLUGIN CLASS***
@@ -211,7 +205,6 @@ export class AnnotationPlugin extends BasePlugin<
211205 createAnnotation : ( pageIndex , anno ) => this . createAnnotation ( pageIndex , anno ) ,
212206 deleteAnnotation : ( pageIndex , id ) => this . deleteAnnotation ( pageIndex , id ) ,
213207 updateAnnotation : ( pageIndex , id , patch ) => this . updateAnnotation ( pageIndex , id , patch ) ,
214- renderAnnotation : ( options ) => this . renderAnnotation ( options ) ,
215208 exportAnnotationsToJSON : ( ) => this . exportAnnotationsToJSON ( ) ,
216209 }
217210 }
@@ -264,21 +257,6 @@ export class AnnotationPlugin extends BasePlugin<
264257 return this . engine . getPageAnnotations ( doc , page )
265258 }
266259
267- private renderAnnotation ( { pageIndex, annotation, options } : RenderAnnotationOptions ) {
268- const coreState = this . coreState . core
269-
270- if ( ! coreState . document ) {
271- return PdfTaskHelper . reject ( { code : PdfErrorCode . NotFound , message : "Document not found" } )
272- }
273-
274- const page = coreState . document . pages . find ( ( page ) => page . index === pageIndex )
275- if ( ! page ) {
276- return PdfTaskHelper . reject ( { code : PdfErrorCode . NotFound , message : "Page not found" } )
277- }
278-
279- return this . engine . renderPageAnnotation ( coreState . document , page , annotation , options )
280- }
281-
282260 private importAnnotations ( items : PdfAnnotationObject [ ] ) {
283261 // If initial load hasn't completed, queue the items
284262 if ( ! this . isInitialLoadComplete ) {
0 commit comments