I am using windows NT and I am trying to print the PCL output directly to the
printer which is a
HP Laser Jet 6P/6MP network printer from my application. Here is my piece of
code :
>>-------------------------------------------------------------------------------------------------
FileOutputStream fos = new FileOutputStream("../temp/tTest.pcl");
Driver driver = new Driver();
driver.setRenderer(Driver.RENDER_PCL);
driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
driver.setOutputStream(fos);
driver.buildFOTree(parser, new InputSource(args[0]));
driver.format();
driver.render();
---------------------------------------------------------------------------------------------------<<
Now instead of printing to the Test.pcl file I want to send the output directly
to the HP Laser Jet 6P/6MP
printer on the network.
Thanks,
Hitesh
Art Welch wrote:
> I thought that I had answered a question about direct printing PCL recently.
> If you will tell me what platform you are using (Windows/Unix) and how you
> are invoking FOP (application or command line). I will try to answer this.
>
> Art
>
> -----Original Message-----
> From: Hitesh Bagchi [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 16, 2001 1:50 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Help in XML Rendering to PostScript
>
> Hello,
> Can somebody tell me how to stream PCL output to a network printer without
> writing to a file.
>
> Thanks,
> Hitesh
>
> [EMAIL PROTECTED] wrote:
>
> > Hello,
> >
> > I am fairly new to FOP and to Java as well. I am wondering if anyone has
> > written a rendering to convert an XML stream to Postscript with FOP
> (similar
> > to the PCL or PDF renderer) - I am in desperate need of a mechanism to do
> > this. We have a current Java app that converts an XML stream into PDF,
> but
> > printing through Adobe Acrobat is too resource intensive on the lower end
> > machines. I have tried converting to PCL and then streaming to a port,
> > which works pretty well, but is not a 100% compatibile (PCL beng only HP)
> >
> > If anyone knows of a way to convert an XML to PS format using a custom FOP
> > piece they've written, or knows of a better mechanism, I'd be forever
> > grateful!
> >
> > Thanks very much,
> >
> > Tony
> >
> > ---------------------------------------------------------------------
> > 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]