Skip to content

Conversation

@edoardocavazza
Copy link
Contributor

Some marked contents have a Lang attribute defined in the props passed to the beginMarkedContentProps operator. With this PR, the evaluator extracts this information. I chose to pass the props object as third argument in order to maintain backwards compatibility, but I'm open to changes.

const pdfDoc = await loadingTask.promise;
const pdfPage = await pdfDoc.getPage(1);

pdfDoc.annotationStorage.setValue("30R", { value: "test" });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no annotations in the pdf so I don't see the point of setting these values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh I am sorry, bad copy/paste from a previous test. Removed

@calixteman
Copy link
Contributor

Could you rebase your patch ?

@calixteman
Copy link
Contributor

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/d64eb63a5678ba9/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/0d18703028e4f9f/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/0d18703028e4f9f/output.txt

Total script time: 60.00 mins

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/d64eb63a5678ba9/output.txt

Total script time: 75.18 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 2

Image differences available at: http://54.193.163.58:8877/d64eb63a5678ba9/reftest-analyzer.html#web=eq.log

@calixteman
Copy link
Contributor

@edoardocavazza Can you check the failure in issue12909 ?

@nicolo-ribaudo
Copy link
Contributor

The lang property can affect which font the browser falls back to, and thus its size. In src/display/text_layer.js there a bunch of calls to #getCtx with the correct language to be able to measure how wide the text rendered by the browser will be, and scale it accordingly.

If some of the elements in the text layer are going to have a different language, we need to make sure to get the measurements with the appropriate canvas context (this might be what's causing the horizontal scaling difference in issue12909).

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants