You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Mark Williams <ma...@skwirel.com> on 2003/12/29 17:47:53 UTC

Specifying printer for print output

Hi,

We have copied an example for printing from xsl-fo using FOP within a java
class.  In short it is:

            PrinterJob pj = PrinterJob.getPrinterJob();
            PrintRenderer renderer = new PrintRenderer(pj);
            driver.setRenderer(renderer);
            driver.run();

It works fine and prints to the default printer.  Does anyone know how we
can tell FOP to print to another printer other than the default.  We do not
want to change the default printer for this purpose.

Thanks in advance.

Mark Williams


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Specifying printer for print output

Posted by Matthew Case <ma...@loanprotector.com>.
woops, I forgot to actually specify the name of the function. it's
PrinterJob.printDialog()

-----Original Message-----
From: Matthew Case [mailto:mattcase@loanprotector.com]
Sent: Monday, December 29, 2003 11:50 AM
To: fop-user@xml.apache.org
Subject: RE: Specifying printer for print output


Seems to me that the PrinterJob class has a function that allows you to
prompt the user for what printer they want to use, etc. I would start there.

http://java.sun.com/j2se/1.3/docs/api/java/awt/print/PrinterJob.html

-----Original Message-----
From: Mark Williams [mailto:mark@skwirel.com]
Sent: Monday, December 29, 2003 11:48 AM
To: fop-user@xml.apache.org
Subject: Specifying printer for print output


Hi,

We have copied an example for printing from xsl-fo using FOP within a java
class.  In short it is:

            PrinterJob pj = PrinterJob.getPrinterJob();
            PrintRenderer renderer = new PrintRenderer(pj);
            driver.setRenderer(renderer);
            driver.run();

It works fine and prints to the default printer.  Does anyone know how we
can tell FOP to print to another printer other than the default.  We do not
want to change the default printer for this purpose.

Thanks in advance.

Mark Williams


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Specifying printer for print output

Posted by Matthew Case <ma...@loanprotector.com>.
Seems to me that the PrinterJob class has a function that allows you to
prompt the user for what printer they want to use, etc. I would start there.

http://java.sun.com/j2se/1.3/docs/api/java/awt/print/PrinterJob.html

-----Original Message-----
From: Mark Williams [mailto:mark@skwirel.com]
Sent: Monday, December 29, 2003 11:48 AM
To: fop-user@xml.apache.org
Subject: Specifying printer for print output


Hi,

We have copied an example for printing from xsl-fo using FOP within a java
class.  In short it is:

            PrinterJob pj = PrinterJob.getPrinterJob();
            PrintRenderer renderer = new PrintRenderer(pj);
            driver.setRenderer(renderer);
            driver.run();

It works fine and prints to the default printer.  Does anyone know how we
can tell FOP to print to another printer other than the default.  We do not
want to change the default printer for this purpose.

Thanks in advance.

Mark Williams


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Specifying printer for print output

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Mark Williams [mailto:mark@skwirel.com]
>
<snip />
> Does anyone know how we
> can tell FOP to print to another printer other than the default.
> We do not want to change the default printer for this purpose.
>

Hi,

IIRC, the problem (with 0.20.5) is that FOP doesn't use the Print API
extensively, because it needs to work on JDK 1.3...

Below is an excerpt from a thread (about 3 months ago) on this list, where
Chris Bowditch explains how he solved this :

<q>
I just open a Byte stream to our printer via TCP/IP. I didnt need to worry
about using windows or even unix print/error management. If you want to
present a list of printers installed on the O/S to the user you are going to
have to use Java 1.4. If you cant use Java 1.4 then you are stuck with using
the default printer or use TCP/IP, where the user specifies either a UNC
name or TCP/IP address and Port.
</q>

Maybe this can be of help?

Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org