| Author |
Message |
|
|
Hello,
I have the same problem with version 4.1.0 trial and pro. After some research, it seems to be due to the jdk http://www-01.ibm.com/support/docview.wss?uid=swg21401159. Jdk 1.4.0 seems to be guilty, but I presume they never solve the problem since it's the same with jdk 1.6.
The workaround seems the use the native printing dialog, but how to do this with icePdf ?
|
 |
|
|
I found how to do, I needed to install the shortcut on the component inside the jscrollpane and not the jscrollpane itself. It only works with an inputMap though, not with a keyListener
It works this way :
Code:
JScrollPane jScrollPane = (JScrollPane) iceController.getDocumentViewController().getViewContainer();
JComponent vue = (JComponent) jScrollPane.getViewport().getComponent(0);
String printKey = "imprimer";
KeyStroke raccourciImprimer = KeyStroke.getKeyStroke('P',
InputEvent.CTRL_DOWN_MASK);
InputMap inputMap = vue.getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW);
inputMap.put(raccourciImprimer, printKey);
ActionMap actionMap = vue.getActionMap();
actionMap.put(printKey, new AbstractAction() {
public void actionPerformed(ActionEvent e) {
//do what you want
}
});
|
 |
|
|
Hello,
I'm trying for a while to catch keyboards event on the view, but can't find a way. I've added just the scrollpanel to my window, so I don't have any menu or toolbars... And then I add a keyListener to this scrollpane, or I modify the inputMap. But the keyPressed method of my listener is never executed.
I tought may be it was not the good object to add the listener, so I also tried with the documentView, but no success.
Code:
Container viewContainer = ((DocumentViewControllerImpl) iceController.getDocumentViewController()).getViewContainer();
viewContainer.addKeyListener(keyListener);
or this way
Code:
AbstractDocumentView abstractDocumentView = (AbstractDocumentView) ((DocumentViewControllerImpl) iceController.getDocumentViewController()).getDocumentView();
abstractDocumentView.addKeyListener(keyListener);
Does anyone have an idea ?
|
 |
|
|
|
You mentionned the method "private boolean setZoom(float zoom, Point centeringPoint, boolean becauseOfValidFitMode)" on DocumentViewControllerImpl as private, which it is, so I don't understand how I can get access to it.
|
 |
|
|
If I open a pdf and the user makes zoom changes et moves the portion of the pdf seen, then he reopens the same pdf, I want to set back the previous zoom, but I want the same location to be zoomed. How do we do that ?
I've found for the zoom this way :
Code:
float oldzoom = pdfViewerController.getDocumentViewController().getZoom();
pdfViewerController.openDocument(pathFichier);
pdfViewerController.getDocumentViewController().setZoom(oldzoom);
but can't figure out for the location. I've searched around the Destination object and setDestinationTarget method but I can't get the coordinates. Could you give me a hint or an exemple ?
|
 |
|
|
|
Let's hope so. Thanks anyway.
|
 |
|
|
|
Sure, here it is.
|
 |
|
|
I have a strange behaviour using the pdf viewer : people are blue. In fact, orange becomes blue, red becomes violet, white becomes orange, yellow becomes green... When I open my pdf file with acrobat reader the colours are perfectly fine. Is there anything to do ?
Thanks
|
 |
|
|