How to print PDF directly in Servoy ?

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

How to print PDF directly in Servoy ?

Postby ashutoslenka426 » Fri May 06, 2016 11:09 am

Hi All,

How can I Print PDF in Servoy directly ? . I am using apache PDF box library . I am successful in it. Is it possible with out using any library ? . The solution should be generic one for all the OS .
AL
ashutoslenka426
 
Posts: 288
Joined: Thu Jan 26, 2012 3:38 pm

Re: How to print PDF directly in Servoy ?

Postby emera » Fri May 06, 2016 11:42 am

Hi,

You can use the pdf_output plugin. You can see it in the developer, Solution Explorer view under "Plugins".
https://wiki.servoy.com/display/public/DOCS/pdf_output

Regards,
Edit
emera
 
Posts: 21
Joined: Tue Jun 17, 2014 8:33 am

Re: How to print PDF directly in Servoy ?

Postby lwjwillemsen » Fri May 06, 2016 1:02 pm

You cannot print a pdf file with the pdf_output plugin.
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 584
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: How to print PDF directly in Servoy ?

Postby emera » Fri May 06, 2016 1:42 pm

The pdf_output plugin and Apache PDFBox are quite similar, they both allow you to create PDF documents or change existing documents.
But what exactly are you trying to do?
emera
 
Posts: 21
Joined: Tue Jun 17, 2014 8:33 am

Re: How to print PDF directly in Servoy ?

Postby ashutoslenka426 » Fri May 06, 2016 1:43 pm

Hi ,

Thanks for your reply . I want to directly print it in the printer.
AL
ashutoslenka426
 
Posts: 288
Joined: Thu Jan 26, 2012 3:38 pm

Re: How to print PDF directly in Servoy ?

Postby emera » Fri May 06, 2016 2:01 pm

Unfortunately this is not possible without using other libraries.
We found an older post https://servoy.com/forum/viewtopic.php?f=22&t=20604 which states it is possible with PDFbox.
emera
 
Posts: 21
Joined: Tue Jun 17, 2014 8:33 am

Re: How to print PDF directly in Servoy ?

Postby ashutoslenka426 » Mon May 09, 2016 2:48 pm

Hi All ,

I am using this .
Code: Select all
desktop = Packages.java.awt.Desktop;
/**@type {java.io.File} */
attachPDF = new Packages.java.io.File(attachPDFJS.getAbsolutePath());
if (desktop.isDesktopSupported())
desktop.getDesktop().print(new Packages.java.io.File(attachPDF));

But this is very inconsistent . Most of the times saying - "There was an error opening this document . This file cannot be found" . I have installed the Adobe reader 11. Please share your thoughts on this
AL
ashutoslenka426
 
Posts: 288
Joined: Thu Jan 26, 2012 3:38 pm


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 4 guests