Details
Description
When running the PDF viewing application on a machine with multiple display devices (monitors),
the print dialog may be shown on the wrong screen when the print button is pressed.
Wrong means that the dialog is not on the same screen as the Window containing the viewer.
Cause is located in class org.icepdf.ri.common.PrintHelper in method
<code>
private PrintService getSetupDialog()
</code>
the patch below should handle the screens correctly:
<code>
private PrintService getSetupDialog() {
final int offset = 50;
Window window = SwingUtilities.getWindowAncestor(viewController.getViewContainer());
GraphicsConfiguration graphicsConfiguration = window == null ? null : window.getGraphicsConfiguration();
return ServiceUI.printDialog(graphicsConfiguration,
viewController.getViewContainer().getX() + offset,
viewController.getViewContainer().getY() + offset,
services, services[0],
DocFlavor.SERVICE_FORMATTED.PRINTABLE,
printRequestAttributeSet);
}
</code>
the print dialog may be shown on the wrong screen when the print button is pressed.
Wrong means that the dialog is not on the same screen as the Window containing the viewer.
Cause is located in class org.icepdf.ri.common.PrintHelper in method
<code>
private PrintService getSetupDialog()
</code>
the patch below should handle the screens correctly:
<code>
private PrintService getSetupDialog() {
final int offset = 50;
Window window = SwingUtilities.getWindowAncestor(viewController.getViewContainer());
GraphicsConfiguration graphicsConfiguration = window == null ? null : window.getGraphicsConfiguration();
return ServiceUI.printDialog(graphicsConfiguration,
viewController.getViewContainer().getX() + offset,
viewController.getViewContainer().getY() + offset,
services, services[0],
DocFlavor.SERVICE_FORMATTED.PRINTABLE,
printRequestAttributeSet);
}
</code>
Activity
Stefan Knoefel
created issue -
Patrick Corless
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 4.2 [ 10243 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #24070 | Tue Mar 01 18:36:10 MST 2011 | patrick.corless | |
Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/PrintHelper.java
|
Patrick Corless
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
priority is Minor