[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
RISC - PDFPrinter Component does not work  XML
Forum Index -> Development
Author Message
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 266
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
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
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
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 266
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
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
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
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 266
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
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
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
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 266
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
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
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


[Thumb - 2017-04-27 07_16_41-CaptainCasa - RISC Client.png]
 Filename 2017-04-27 07_16_41-CaptainCasa - RISC Client.png [Disk] Download
 Description
 Filesize 37 Kbytes
 Downloaded:  386 time(s)


Björn Müller, CaptainCasa GmbH
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 266
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
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

[WWW]
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
[WWW]
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
[WWW]
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team