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 Everson Rogério <ev...@yahoo.com.br> on 2011/08/26 06:11:14 UTC

Help: XSL to PCL

Hello
I am using a Java class to generate PDF from an XSL and XML. Now, I need to generate PCL with these XSL and XML files.

I read something about this in Graphic Library "fop" org.apache.fop.render.pcl, but I'm not succeeding.
Can anyone help me? Send examples?

Note that there is an image in the PDF generated, so I'm using the tag <fo:external-graphic>. and works good!

Thanks

RE: Help: XSL to PCL

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
Well one of the first things you would need to do is configure the pcl
renderer in the config file.

http://xmlgraphics.apache.org/fop/0.95/configuration.html#pcl-renderer

 

and be aware of the restrictions 

 

http://xmlgraphics.apache.org/fop/0.95/output.html#pcl

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer





Re: Help: XSL to PCL

Posted by Chris Bowditch <bo...@hotmail.com>.
On 26/08/2011 05:11, Everson Rogério wrote:
> Hello
> I am using a Java class to generate PDF from an XSL and XML. Now, I 
> need to generate PCL with these XSL and XML files.
>
> I read something about this in Graphic Library "fop" 
> org.apache.fop.render.pcl, but I'm not succeeding.

If you are having a problem, then describing the problem would be 
helpful, e.g. if you get an error then posting the stack will help 
others to guide you.

> Can anyone help me? Send examples?

The FOP distribution includes an example of how to render XML+XSL to PDF 
from a Java application in 
fop\examples\embedding\java\embedding\ExampleXML2PDF.java.

Changing this example to generate PCL is a simple one line change to the 
following line:

Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);

Changing it to:

Fop fop = fopFactory.newFop(MimeConstants.MIME_PCL, foUserAgent, out);

>
> Note that there is an image in the PDF generated, so I'm using the tag 
> <fo:external-graphic>. and works good!
>
> Thanks

Regards,

Chris

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


Re: Help: XSL to PCL

Posted by dinuka dayarathna <di...@gmail.com>.
Hi Everson,
I tried to convert XML --> PDF. at first time I also failed. reason for the
failure was I had used wrong fop.jar library.
when I have added the correct fop.jar it worked well. so check that you are
using the correct fop.jar library.


On Fri, Aug 26, 2011 at 9:41 AM, Everson Rogério <ev...@yahoo.com.br>wrote:

> Hello
> I am using a Java class to generate PDF from an XSL and XML. Now, I need
> to generate PCL with these XSL and XML files.
>
> I read something about this in Graphic Library "fop"
> org.apache.fop.render.pcl, but I'm not succeeding.
> Can anyone help me? Send examples?
>
> Note that there is an image in the PDF generated, so I'm using the tag
> <fo:external-graphic>. and works good!
>
> Thanks
>



-- 
Dinuka Dayarathna,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.