Details
Description
When selecting the Fit Width view, an unnecessary horizontal scrollbar is added to the PDF viewer.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Attachment | FIT_TO_WIDTH.jpg [ 12132 ] |
| Salesforce Case | [] | |
| Fix Version/s | 4.0 [ 10222 ] |
| Repository | Revision | Date | User | Message |
| ICEsoft Public SVN Repository | #20204 | Wed Jan 13 06:36:49 MST 2010 | patrick.corless | |
| Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/DocumentViewControllerImpl.java
MODIFY
/icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/AbstractDocumentView.java
MODIFY
/icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/TwoPageView.java
MODIFY
/icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/TwoColumnPageView.java
MODIFY
/icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/OnePageView.java
MODIFY
/icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/OneColumnPageView.java
MODIFY
/icepdf/trunk/icepdf/core/src/org/icepdf/core/views/DocumentView.java
|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Salesforce Case | [5007000000ApPDh] |
| Status | Resolved [ 5 ] | Closed [ 6 ] |

Updated the page fit algorithms so that fit width and height work more consistently. The old algorithms did not take into consideration the layout manager padding and insets and as a result resorted to a fudge factor for calculating the fit to width or fit to height.
The four document view types DocumentView.getDocumentSize implementation was updated respectively to calculate a normalized page sized based on a zoom of 1.0f. The DocumentViewControllerImpl could then use this normalized value from each of the four view types to calculate accurate width and hight scaling factors. In most cases no horizontal scroll bar will be present for fit to width and no vertical scroll bar for fit to height for views that are not column based.