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

New Feature: Autoresize #42

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

francesco-kriegel
Copy link

Hi Boris,

in my fork I added automatic resizing of the PDF file view. For this purpose an appropriate ControlListener was inserted, cf. the source code.

Would you please pull this?

Cheers,
Francesco

lemmy and others added 21 commits February 6, 2012 09:04
happy which otherwise _silently_ skips the classes
This implementation follows the second approach outlined
in #issuecomment-5596872 (see issue Borisvl#20 on github.com/Borisvl/
Pdf4Eclipse). Auto-trimming can be turned on and of with the
boolean field PDFPageView.autoTrimOn, which, for now, is just
a static constant.

Things that remain to do:

 - I'm not sure if this implementation is memory efficient.
   Maybe we could do with copying the image one less time.

 - Coordinate transformation for forward/backward search and
   for annotations.

 - Correct handling of the "fit page to screen" and "fit page
   width to screen width" zoom actions.

 - Frontend to turn auto-trimming on and off (toggle button).
Finish implementation of auto-trimming of page margins.
Detailed list of changes compared to previous commit:

 - Add front end (toolbar button).

 - Fix coordinate transformations for annotations and for
   synctex forward/backward search.

 - Fix behaviour of the "fit page to screen" and "fit page
   width to screen width" commands when auto-trimming is
   activated.
With the previous implementation, fitting the page width to the
screen width sometimes resulted in a page width that was actually
one pixel *larger* than the screen width. This was due the use
of Math.round(). This commit should fix this issue by always
rounding _down_ the would-be floating point page dimensions to
the integer page dimensions.
margins are cut off. They are only useful when printed on paper,
but not on a computer screen.
@francesco-kriegel francesco-kriegel force-pushed the master branch 2 times, most recently from 34f06f4 to ad41063 Compare February 22, 2017 21:09
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.

3 participants