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

Elements not displayed in demo viewer #17069

Closed
user100582 opened this issue Oct 4, 2023 · 2 comments · Fixed by #17070 or #17075
Closed

Elements not displayed in demo viewer #17069

user100582 opened this issue Oct 4, 2023 · 2 comments · Fixed by #17070 or #17075
Assignees

Comments

@user100582
Copy link

user100582 commented Oct 4, 2023

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

Configuration:

  • Web browser and its version: Chrome 117.0.5938.63 (Official Build) (64-bit)
  • Operating system and its version: Windows 10 Enterprise
  • PDF.js version: 4.0.10 & 3.11.174
  • Is a browser extension: no

Steps to reproduce the problem:

  1. go to https://mozilla.github.io/pdf.js/web/viewer.html
  2. click on Open File button
  3. choose attached pdf

What is the expected behavior? (add screenshot)
comment and sticky note are rendered in viewer
please note this is working in 2.5.207 PDF.js version:
image

What went wrong? (add screenshot)
comment and sticky note are not rendered in viewer
image

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

@calixteman
Copy link
Contributor

I can reproduce in Firefox nightly.
We aren't rendering some annotations which must be:

if (data.noHTML) {

@calixteman calixteman self-assigned this Oct 4, 2023
calixteman added a commit to calixteman/pdf.js that referenced this issue Oct 4, 2023
mozilla#17069)

When an element has the hasOwnCanvas flag we must have an HTML container to attach
the canvas where the element will be rendered.
So the noHTML flag must take this information into account:
 - in some cases the noHTML flag is resetted depending on the hasOwnCanvas value;
 - in some others, the hasOwnCanvas flag is set depending on the value of noHTML.
calixteman added a commit to calixteman/pdf.js that referenced this issue Oct 4, 2023
mozilla#17069)

When an element has the hasOwnCanvas flag we must have an HTML container to attach
the canvas where the element will be rendered.
So the noHTML flag must take this information into account:
 - in some cases the noHTML flag is resetted depending on the hasOwnCanvas value;
 - in some others, the hasOwnCanvas flag is set depending on the value of noHTML.
calixteman added a commit that referenced this issue Oct 5, 2023
Update the noHTML flag to take into account the hasOwnCanvas one (fixes #17069)
@user100582
Copy link
Author

Hi @calixteman,

Thank you for resolving this problem! I have tested on Demo site and sticky note appears correctly.
Comment also appears but is missing component on hover. Here is how it is displayed in 2.5.207 PDF.js version:
image
Any chance you could resolve this or I need to open another issue?

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