Print a *.pdf without opening it but with print dialog

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Print a *.pdf without opening it but with print dialog

Postby ina.wels » Wed Aug 22, 2012 9:05 am

Hey everybody!
After generating a *.pdf with "plugins.file.writeFile()" I want to print this file.
At the moment my code looks like:

var desktop = Packages.java.awt.Desktop;
var file = new Packages.java.io.File("D:\\test.pdf");
if(desktop.isDesktopSupported())
{desktop.getDesktop().print(file);}

The *.pdf is opened and directly sent to the default printer.
I would prefer to get the print dialog and not to open this file.

Any suggestions?

Greets Ina
ina.wels
 
Posts: 16
Joined: Fri Jan 27, 2012 10:51 am

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 17 guests

cron