Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ink-Annotations not shown #13298

Closed
SimonErm opened this issue Apr 26, 2021 · 4 comments · Fixed by #13301
Closed

Ink-Annotations not shown #13298

SimonErm opened this issue Apr 26, 2021 · 4 comments · Fixed by #13301

Comments

@SimonErm
Copy link

SimonErm commented Apr 26, 2021

Attach (recommended) or Link to PDF file here:
output.pdf

Configuration:

  • Web browser and its version: Firefox 88.0
  • Operating system and its version: macOS Big Sur 11.2.3 (20D91)
  • PDF.js version: 2.8.243
  • Is a browser extension: no/Firefox built-in

Steps to reproduce the problem:

  1. add Ink-Annotations to a pdf (i use https://github.com/highkite/pdfAnnotate, Annotations with appearance streams are shown correctly)
  2. open output file in firefox

What is the expected behavior?
The annotations should be visible.
Bildschirmfoto 2021-04-26 um 09 15 48

What went wrong?
The annotations are added to the dom but invisible.
Bildschirmfoto 2021-04-26 um 09 18 26

Tested successfull with FoxitReader, AcrobatReader, Chrome and Safari.

@calixteman
Copy link
Contributor

The Ink annotation doesn't contain an appearance so we should build a default one using the color and the Inklist.

@SimonErm
Copy link
Author

Thanks for the fast reply.
The Ink annotation is already build, but it's transparent.
If i change the stroke manual from transparent to black it is shown like it should.

@Snuffleupagus
Copy link
Collaborator

This is (essentially) just another case of issue #6810.

@calixteman
Copy link
Contributor

We draw the annotation on the canvas using the AP entry and then we use a transparent line in svg to have an object to interact with in the annotation_layer.
Open your pdf here: https://brendandahl.github.io/pdf.js.utils/browser/#root=997,0
and you'll see that no appearance stream (AP) is there.
But if you open https://github.com/mozilla/pdf.js/blob/master/test/pdfs/annotation-caret-ink.pdf in the pdf browser with #root=25,0, you'll see an AP entry with some pdf code to render the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants