I need to print a file pdf without open preview.
If I use this code :
var desktop = Packages.java.awt.Desktop;
if (desktop.isDesktopSupported()) {
desktop.getDesktop().print(“c:/temp/out.pdf”);
}
The file is printed on printer default system but I need to set the default printer.
Is it possibile to set the default printer?
If I use this code:
var _printerJob = Packages.java.awt.print.PrinterJob.getPrinterJob()
_printerJob.setJobName(“c:/temp/out.pdf”)
_printerJob.printDialog()
The file isn’t printed.
Does somebody know an alternalitive solution to print a pdf file in Servoy?
Thanks a lot!
Stefania
I downloaded pdfbox.jar, fontbox.jar and jempbox.jar from http://pdfbox.apache.org and put these in the beans directory but the application smart doesn’t work I have this error.
com.sun.deploy.net.JARSigningException: found a voice not signed in resource (Http:/localhost:8080/beans/fontbox.jar,1418315714352)
at com.sun.javaws,secutiry.SigningInfo.gtCommonCodeSignersForJar(Unknown Source)
How I can sign the beans in Server Servoy?
In the developer it works.
Thank Stefania
It looks like you need to code-sign the bean yourself. You can do that using the signtester tool.
Of course that requires that you have a code signing certificate,be it self-signed or one from a recognized signing authority.