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

Force default icon size for Text annotations without appearance stream #4520

Merged
merged 1 commit into from
Apr 22, 2014

Conversation

timvandermeij
Copy link
Contributor

Fixes #3998.

@@ -21,6 +21,8 @@

'use strict';

var DEFAULT_ICON_WIDTH = 22;
var DEFAULT_ICON_HEIGHT = 18.25;
Copy link
Contributor

Choose a reason for hiding this comment

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

Our icons are defined as squares 64x64 or 40x40. We probably need to make it a square here too

@yurydelendik
Copy link
Contributor

okay, trying to find PDFs where annotations without AP to test the theory

@ghost
Copy link

ghost commented Apr 16, 2014

From what I've seen, Reader only ignores /Rect for Text annotations that use a standard icon (no AP).
Some annotations types (e.g. Links) don't have APs but should still be sized according to their /Rect.

An idea would be to force the annotation's size to fit the icon's here: https://github.com/mozilla/pdf.js/blob/master/src/shared/annotation.js#L625

@timvandermeij timvandermeij changed the title Using default icon size for annotations without appearance stream Force default icon size for Text annotations without appearance stream [WIP] Apr 18, 2014
@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/be047d68d835ea7/output.txt

@timvandermeij
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/69d67063e628ccc/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/d50d8c486a9156d/output.txt

@timvandermeij timvandermeij changed the title Force default icon size for Text annotations without appearance stream [WIP] Force default icon size for Text annotations without appearance stream Apr 18, 2014
@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/d50d8c486a9156d/output.txt

Total script time: 21.97 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/69d67063e628ccc/output.txt

Total script time: 25.89 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

yurydelendik added a commit that referenced this pull request Apr 22, 2014
Force default icon size for Text annotations without appearance stream
@yurydelendik yurydelendik merged commit bda1865 into mozilla:master Apr 22, 2014
@yurydelendik
Copy link
Contributor

Looks good, thanks!

@timvandermeij timvandermeij deleted the annotation-icon-size branch April 22, 2014 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Draws outside of document
3 participants