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

Annotations are misaligned when PDF pages vary in dimensions #4587

Closed
tpluscode opened this issue Mar 4, 2024 · 11 comments
Closed

Annotations are misaligned when PDF pages vary in dimensions #4587

tpluscode opened this issue Mar 4, 2024 · 11 comments
Assignees
Labels
🐛Bug Something isn't working Module: PDF editor
Projects
Milestone

Comments

@tpluscode
Copy link

Describe the bug

I have PDFs where some pages are merged. Sometimes they are fold outs where 4 or more pages of the original document are a single page in PDF

To Reproduce
Steps to reproduce the behavior:

  1. Go to a project
  2. Upload this PDF
  3. Open it for annotation
  4. Go to page 6 which is 4 times wider than a single page
  5. Start annotating something
  6. Notice that the highlights are not aligned with the document contents although mouse events are correctly positioned

The degree to which the annotations are off appears to change with zoom level

Screenshots

image

INCEpTION.-.Annotation.mp4

Please complete the following information:

  • Version and build ID: 31.1 (2024-02-20 23:27:52, build c78ce3c)
  • OS: OS X Catalina
  • Browser: Brave 1.61 (Chromium 120)
@reckart reckart added this to 🔖 To do in Kanban via automation Mar 4, 2024
@reckart reckart added 🐛Bug Something isn't working Module: PDF editor labels Mar 4, 2024
@reckart reckart self-assigned this Mar 4, 2024
@reckart reckart modified the milestones: 32.0, 31.2 Mar 4, 2024
reckart added a commit that referenced this issue Mar 4, 2024
- Adjustment has to be made not only if first page is larger but also if first page is smaller than subsequent pages
reckart added a commit that referenced this issue Mar 4, 2024
…ns-are-misaligned-when-PDF-pages-vary-in-dimensions

#4587 - Annotations are misaligned when PDF pages vary in dimensions
@reckart
Copy link
Member

reckart commented Mar 4, 2024

I had fixed this some time ago for the case that the first page is wider than the others - but in your case, it is just the opposite. Should work now.

@reckart reckart closed this as completed Mar 4, 2024
Kanban automation moved this from 🔖 To do to 🍹 Done Mar 4, 2024
@reckart
Copy link
Member

reckart commented Mar 4, 2024

Screen.Recording.2024-03-04.at.19.35.35.mp4

reckart added a commit that referenced this issue Mar 4, 2024
* release/31.x:
  - #4556 - Unable to access PMC BioC service
  #4587 - Annotations are misaligned when PDF pages vary in dimensions
  #4556 - Unable to access PMC BioC service
@tpluscode
Copy link
Author

the case that the first page is wider than the others

Now that you mention it, I tried one like that too. There's this effect that the annotations shift initially but zoom in/out fixes them:

Screen.Recording.2024-03-04.at.21.08.31.mp4

That is not so bad and I also notice the pages are actually clipped a little (separate issue?)

@reckart
Copy link
Member

reckart commented Mar 5, 2024

@tpluscode do you have a public link to that PDF?

@tpluscode
Copy link
Author

@tpluscode
Copy link
Author

I confirm that the Mercedes PDF now behaves correctly. Thank you,

The City Angel above is still broken though. Pages clipped and annotations on the 2nd page shift back and forth

@reckart reckart reopened this Mar 9, 2024
Kanban automation moved this from 🍹 Done to 🏃‍♀️ In progress Mar 9, 2024
@reckart reckart closed this as completed Mar 9, 2024
Kanban automation moved this from 🏃‍♀️ In progress to 🍹 Done Mar 9, 2024
@reckart
Copy link
Member

reckart commented Mar 9, 2024

@tpluscode The City Angel should work fine with #4613

@reckart
Copy link
Member

reckart commented Mar 9, 2024

Regarding clipping - that's probably an issue of PDF.js itself. Maybe try opening the PDF in Mozilla which uses PDF.js as its native PDF viewer to check (although INCEpTION likely uses an older version than current Mozilla versions).

@tpluscode
Copy link
Author

Super. Thank you so much for your awesome work on this project!

@reckart
Copy link
Member

reckart commented Mar 9, 2024

If by any chance you hear that the AllegoGraph version with the path query fix comes out (8.1.1 I believe), would be great if you could briefly ping me.

@tpluscode
Copy link
Author

That PDF looks good in Firefox 123 🤷

If by any chance you hear that the AllegroGraph version with the path query fix comes out (8.1.1 I believe), would be great if you could briefly ping me.

Will comment on that issue or PR as soon as I know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: PDF editor
Projects
Kanban
  
🍹 Done
Development

No branches or pull requests

2 participants