Subject: Re: Printing PDF on the client default printer.




Thanks for the quick answer.
I've already seen this FAQ but I can't achieve this :
Here is my code :

public static void printFO(InputSource foFile) {
try {
System.out.println("printFo");

Driver driver = new Driver(foFile, null);

System.out.println("printFo 2");

PrinterJob pj = PrinterJob.getPrinterJob();

System.out.println("printFo 3");

PrintRenderer renderer = new PrintRenderer(pj);

System.out.println("printFo 4");

driver.setRenderer(renderer);

System.out.println("printFo 5");

driver.run();
} catch (Exception ex) {
}
}

The trace displays printFo and printFo2 and then nothing...
Do you have an idea (I hope I provided enough information) ?
Thanks again.


Jeremias Maerki-2 wrote:
>
> Please take a look at the follow FAQ entry:
> http://xmlgraphics.apache.org/fop/faq.html#iex-pdf-print-from-browser
>
> HTH
>
> On 11.02.2009 20:38:06 jgfa9 wrote:
>>
>> Hi all,
>> The following message, posted on the list in 2004 exactly describes my
>> situation : I'm able to print a generated pdf file directly on printer
>> (not
>> prompted to be opened) on the app server default printer but I'm not able
>> to
>> print on the client default printer.
>> Thanks in advance for your help.
>>
>> On Thu, 2004-10-21 at 00:29, Manoj_Nair@xxxxxxxxxxxx wrote:
>> > My requirement is to render an XML as a PDF and then print the PDF on
>> the
>> > clients default printer. I dont want the PDF to prompt user to open the
>> > acrobat reader.
>> >
>> > I already have an applet on the client side which uses PrinterJob class
>> to
>> > popup the printer selection box on client side.
>> >
>> > Now how do I redirect the content from server to this printer?
>> >
>> > Should I use Driver.RENDER_PRINT / Driver.RENDER_PCL set in the fop
>> driver
>> > renderer ? and what content type should the response object return?
>> >
>> > Thanks
>> > Manoj
>> >
>> > PS: I have successfully use the FopPrinter example ( FopPrintServlet )
>> to
>> > print pdfs on the app servers default printer but what I need is to be
>> > able
>> > to print on the clients default printer and not on servers printer.
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Printing-PDF-on-the-client-default-printer.-tp21962598p21962598.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx
>
>
>

--
View this message in context:
http://www.nabble.com/Printing-PDF-on-the-client-default-printer.-tp21962598p21962945.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx



Privacy