Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Printing of NDiagram (Read 4387 times)
KBalquis
YaBB Newbies
*
Offline


Senior developer

Posts: 12
Joined: Nov 19th, 2007
Printing of NDiagram
Dec 12th, 2007 at 5:50am
Print Post  
Hello,
I have a button that executes the following Javascript function:
"
function Print()
{
    var wfGraph = <%= wfGraph.AppletElement %>.getFlowChart();
     wfGraph.print();

"

Is there a way to instruct the wfGraph object to which printer should he print without giving asking the user? is there anyway to over-ride the security of Java applet and print without prompting the user?
Is there any way to perform the printing on the Server not on the client?

Regards,
Kamel Balquis
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing of NDiagram
Reply #1 - Dec 12th, 2007 at 8:43am
Print Post  
Hello,

We can easily add a print(printerName) overloaded method for you, and will try to post the updated version here later today.

You cannot override the Java security system; otherwise it would not be very secure, would it 8)

.NET cannot access the printer when running from a service (IIS), so printing on the server side is not possible. You might devise some workaround, such as exporting PDF files when you need to print, and run a desktop application that periodically checks for new PDFs and prints them.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing of NDiagram
Reply #2 - Dec 13th, 2007 at 9:28am
Print Post  
Hi,

This version of the .jar file adds a print(String printerName) method:
https://mindfusion.org/_temp/jar_print.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
KBalquis
YaBB Newbies
*
Offline


Senior developer

Posts: 12
Joined: Nov 19th, 2007
Re: Printing of NDiagram
Reply #3 - Dec 13th, 2007 at 11:31am
Print Post  
Thank you, it prints without asking for printer  Smiley.

However, it prints Only to the Default printer and doesn't take the printer name i provide.

Example:
I provided
var wfGraph = <%= wfGraph.AppletElement %>.getFlowChart();
    wfGraph.print('DMS Printer');

it printed on the default printer of my pc.
Any suggestions?


thank you
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing of NDiagram
Reply #4 - Dec 13th, 2007 at 11:56am
Print Post  
That's strange - printer selection worked fine in our tests. The applet will print on the default printer if it can't find a printer with the specified name. As a name you must use the one shown at the top of the printer property page - is 'DMS Printer' what you see there for your printer? Could you also check if there is some output printed in the Java console while the method is running?

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing of NDiagram
Reply #5 - Dec 13th, 2007 at 12:32pm
Print Post  
Ok, this worked fine in a desktop application, but there is a security exception thrown when trying to enumerate the printers while running in the browser. Unfortunately it is thrown without even asking the user whether they allow printer enumeration Undecided For this to work we'll probably have to digitally-sign the .jar file, and your users will have to select our certificate in the Control Panel\Java\Security\Certificates dialog as a trusted one.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint