Author |
Message |
11/04/2017 13:26:13
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Hi,
the PDFPrinter component does not react when calling the trigger method.
Nothing happens and the callback is not called.
The same code works with the rich client.
Thanks for any help!
Best regards
Frauke
|
|
|
11/04/2017 14:00:41
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
Hi Frauke,
PDFPRINTER is not supported in the RISC client. There is no native access to the PDF printing API anymore...
PDFRENDERER still is supported but uses of course an iframe to render the PDF content inside. There is also a printtrigger there but this cannot be automated or made dark...
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
12/04/2017 09:08:52
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Hi Björn,
oh, this is not the answer I like to hear. I don't think we could just drop the functionality, since our customers are using it (with the rich client).
Is there really no other possibility to print a PDF from JavaScript?
Is it possible to render the iFrame invisible and send a print command to it? But well, we also need a callback when the printing is done...
Best regards
Frauke
|
|
|
19/04/2017 09:46:57
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
I can only provide workarounds: e.g. modeless dialog coming up and showing/printing the PDF...
Reagrds, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
24/04/2017 11:43:45
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Hi Björn,
that look good so far, but is there any possibility to trigger the ActionListener, which we use as a callback?
Code:
PDFPRINTERNode pdfPrinterNode = new PDFPRINTERNode();
pdfPrinterNode.setActionListener("#{" + rootExpression + ".onPrintFinished}");
Maybe, when the user closes the popup?
Best regards
Frauke
|
|
|
24/04/2017 12:02:33
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
Hi,
I not even get a notification that the print actually was started...
Also after quickly scanning Google, I believe the response is "No...".
Sorry, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
24/04/2017 12:57:51
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Nothing at all?
Not even when the popup was opened or closed?
Just something?
We really need some kind of callback ...
Best regards
Frauke
|
|
|
27/04/2017 05:09:23
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
Hi,
we are living in the browser...! ;-)
I now added one feature, which maybe is some compromise: if setting WITHSERVERPRINTNOTIFICATION then the popup looks as shown in the attachment...
But this is something, which typically needs to be pushed to the application...
Regards, Björn
|
Filename |
2017-04-27 07_16_41-CaptainCasa - RISC Client.png |
Download
|
Description |
|
Filesize |
37 Kbytes
|
Downloaded: |
394 time(s) |
|
Björn Müller, CaptainCasa GmbH |
|
|
27/04/2017 08:01:39
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
What is the difference to the other one? Or just the two additional buttons at the bottom?
Well yes, that would be fine with us!
Thank you
|
|
|
15/06/2017 14:28:36
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi,
In order to verify what button the user has pressed, we must call BaseActionEventPdfprinterNotification.getPrintResult(). Now be careful, the method behaves in RISC differently than in Swing.
Pressing the green button "document was printed" in Swing, the method getPrintResult() returns "OK". But pressing the green button "document was printed" in RISC, the method getPrintResult() returns "SUCCESS".
The constant BaseActionEventPdfprinterNotification.RESULT_OK contains in Swing as well as in RISC the string "OK".
As a workaround, I use HttpSessionAccess.checkIfCurrentClientTypeIsRisc() to compare to "OK" or to "SUCCESS".
Björn, what do you think about?
Regards, Daniel
|
|
|
16/06/2017 12:47:36
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi Björn
On second thoughts, may be you could fix to return always OK?
Hoping nobody tests against "SUCCESS" already!
Regards, Daniel
|
|
|
17/06/2017 09:14:36
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi,
After consulting one's pillow...
Of course to be on the sure side the best is that we check in the code for getResult() equals "OK" OR getResult() equals "SUCESS", regardless of checkIfCurrentClientTypeIsRisc.
Kind regards, Daniel
|
|
|
|