intbot/ng2-pdfjs-viewer

Viewer not displaying annotations.

blkdog opened this issue · 1 comments

using https://github.com/highkite/pdfAnnotate to add annotations to downloaded pdf's. I do not see any of the annotations that I add, but when I download the document via the viewer the annotations are present in the downloaded doc.


this.kycSeedService.getAthenaeumDocumentByID(doc.id, true).subscribe(
      (data: Uint8Array) => {
        let factory = new AnnotationFactory(data);
        factory.createSquareAnnotation({
          page: 0,
          rect: [100, 100, 200, 200],
          contents: "Test123",
          author: "John",
          color: {r: 128, g: 128, b: 128},
          fill: {r: 255, g: 255, b: 0}
        })
        this.PdfJsViewerComponent.pdfSrc = factory.write(); // pdfSrc can be Blob or Uint8Array
        this.PdfJsViewerComponent.refresh(); // Ask pdf viewer to load/refresh pdf
      },
      (error: HttpErrorResponse) => {
      }
    )

User error. Sorry