Of course if the PCL or PS renderers met your needs then the solution could
be trivial. For example under AIX (IBM Unix) I do something like:
proc = Runtime.getRuntime().exec("lp -d" + print_queue + " -o -dp
-");
out = proc.getOutputStream();
And give the OutputStream (out) to the PCLRenderer and it happily sends the
PCL to the AIX print queue.
I have also done something similar under Windows, but admittedly have not
done this in a long time, so I do not recall the syntax off hand. IIRC it
was as simple as opening a FileOutputStream to a network printer URL (or
something like that).
Of course if you need fancy things like SVG or user fonts then the
PCLRenderer may not work for you (PS may do more, but I have not tried it).
FWIW, I suspect that PCL or PS would be MUCH faster printing than AWT.
Art
-----Original Message-----
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 5:13 PM
To: [EMAIL PROTECTED]
Subject: RE: FOP Print Option
That is what I thought, but I was hoping there may have been some progress
made in this area. :)
Jim
> -----Original Message-----
> From: Ralph LaChance [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 08, 2002 3:34 PM
> To: [EMAIL PROTECTED]
> Subject: Re: FOP Print Option
>
>
> At 03:53 PM 3/8/02, you wrote:
> >I need to use the FOP print option (-print) to print a FO directly to a
> >printer. The problem is, I need to tell FOP which printer (by
> name, port or
> >UNC name) to print to. Displaying the preview window (-awt) or printer
> >dialog is not an option. I will be embedding this code in an application
> >which will run unattended. The application will "wake up",
> check for FOs to
> >print and print them automatically without any user intervention
> and then go
> >back to sleep. The print out must go to a specified printer containing a
> >special paper which will most likely NOT be the default printer.
> Any ideas
> >how to do this?
>
> This was answered previously, please check the archives.
>
> The short answer is that you cannot in any straightforward fashion
> programmatically assign a printjob to a specific printer pre-Java 1.4.
> There new JavaPrintService facility in 1.4 is promising, but I think
> you might have trouble trying to run fop in 1.4 yet.
>
> If someone wishes to "refine" this answer, please jump in;
> Alex -- another topic for the faq?
>
>
>
> ' Best,
> -Ralph LaChance
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]