Proof-of-concept for auto-trimming of page margins#21
Open
robamler wants to merge 3 commits intoBorisvl:masterfrom
Open
Proof-of-concept for auto-trimming of page margins#21robamler wants to merge 3 commits intoBorisvl:masterfrom
robamler wants to merge 3 commits intoBorisvl:masterfrom
Conversation
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.
Author
|
Hi Boris, |
Owner
|
Hi, thank you very much for your effort. I will take a closer look at it in the next few days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Please note that I'm new to github. I'm not sure if a pull request is the correct way to notify about a half-baked new feature on a topic branch.)
This implementation follows the second approach outlined in #issuecomment-5596872 (see issue #20). Auto-trimming can be turned on and off with the boolean field PDFPageView.autoTrimOn, which, for now, is just a static constant.
Things that remain to be done: