Skip to content

TextLayer slightly misaligned #14176

Open
@Vanessa219

Description

@Vanessa219

Attach (recommended) or Link to PDF file here:

asymmetrically.pdf

Configuration:

  • Web browser and its version: Chrome 94.0.4606.81
  • Operating system and its version: MacOS 11.6
  • PDF.js version: The version was not found, it was generated by running gulp minified-legacy after updating from the master.
  • Is a browser extension: Yes

Steps to reproduce the problem:

  1. Open this PDF and scroll to A B S T R A C T
  2. Select and copy asymmetrically
  3. Paste the content as symmetrically

What is the expected behavior? (add screenshot)

Paste the content as asymmetrically

What went wrong? (add screenshot)

  1. textLayer and canvasWrapper are not aligned.
    image
Off-topic
  1. The page number in the input box is incorrect.
    image

Activity

Snuffleupagus

Snuffleupagus commented on Oct 22, 2021

@Snuffleupagus
Collaborator

Configuration:
* Web browser and its version: The latest
* Operating system and its version: The latest
* PDF.js version: The latest
* Is a browser extension: Yes

None of this is useful, since "the latest" doesn't mean anything; you need to actually fill out this section properly with actual names and version numbers explicitly specified.


The page number in the input box is incorrect.

That's most definitely correct, see https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#G11.1696265. (And if that were a bug, which it clearly isn't, you should always report one problem per issue.)

changed the title [-]Misaligned and page fault[/-] [+]TextLayer slightly misaligned[/+] on Oct 22, 2021
Vanessa219

Vanessa219 commented on Oct 22, 2021

@Vanessa219
Author

Thanks, updated.

TazmanianDI

TazmanianDI commented on Sep 22, 2023

@TazmanianDI

Instead of creating another issue, I'll just add a comment with a second example and some more details. I tried on two different machines and 5 different browsers, all with the same results. I initially noticed this developing the pdf viewer on my own site but I was able to repro it using the version that is deployed at https://mozilla.github.io/pdf.js/web/viewer.html.

Repro:

  1. Use the attached PDF or download from https://pdfobject.com/pdf/pdf_open_parameters_acro8.pdf
  2. Visit https://mozilla.github.io/pdf.js/web/viewer.html
  3. Open the downloaded PDF from above.
  4. Use the find function to search for "this guide". The example here is the 7th match.

Operating system: Windows 10 22H2 19045.3448 and MacOS 13.6 (22G120)
Browser: Edge 117.0.2045.36 (Windows), Chrome 117.0.5938.92 (Both), Firefox 117.0.1 (Mac), Safari 16.6 (18615.3.12.11.2) (Mac)
Library version: 3.10.111
Is browser extension: no

pdf_open_parameters_acro8.pdf
image

TazmanianDI

TazmanianDI commented on Sep 25, 2023

@TazmanianDI

Someone pointed out to me that this library is what is actually used as the built-in/native viewer in Firefox. So I tried opening the link to the PDF above directly in FF and it also shows the same misalignment problem. The Chrome viewer for comparison does not.

Podginator

Podginator commented on Dec 10, 2024

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Vanessa219@Snuffleupagus@Podginator@TazmanianDI

        Issue actions

          TextLayer slightly misaligned · Issue #14176 · mozilla/pdf.js