views:

33

answers:

2

I have an xml file with which i want to print as a PDF using PCL. I am new to PCL. Can i use PCL to get the xml printed in PDF format directly or should i have some intermediate process to create a PDF file and then use PCL to get it printed as PDF?

+1  A: 

PCL is a printer control language. In other words command bytes you send to a (usually HP) printer which is then converted to ink on a page. This is normally not the way you will generate a PDF since too much information from the original will be lost.

You will normally want to convert your XML to something describing the actual print you want to have. A reasonable choice for this is the XSL-FO XML dialect which, however, is not very nice to do by hand. You can then choose to convert your XML into DocBook XML which in turn has very nice style sheets for converting further on to XSL-FO and other formats.

You can then use Apache FOP to convert XSL-FO into many formats, one being PDF. This allows you to - if FOP gets too small - to replace with one of several commercial XSL_FO rendering engines at a later date.

Thorbjørn Ravn Andersen
Thanks for your reply. Few more queries, 1) I read that XSL_FO can also create PCL as its output format just like PDF. What will be the difference between, printing the content using PCL format and PDF format provided by XSL_FO. 2) From what i read PCL seems to have several advantages over printing directly as PDF. Do i have to convert PDF to PCL before printing. Does it make sense. What tool can be used for the same.
Rachel
XSL-FO is _just_ an XML dialect. You need a conversion program capable of converting to convert it. I would look into a conversion process that did not involve PCL at all.
Thorbjørn Ravn Andersen
+1  A: 

If you have a xml, there are two ways to recieve PDF file. 1. Create stylesheet for your xml, and use XEP or 2. use just your xml and VisualXSL, which will help you create your pdf for print.

More additional: If you will create your xsl stylsheet, you can format by XEP many type of PDFs, for example PDF/1A, or another levels

Both XEP and VisualXSL are Renderx products(http://www.renderx.com/tools/index.html) and they have trial versions, that you can use:). I have used both products many times, and was satisfied. You can also visit the forum where you can find answers about how to use and how usefull are products described above. http://cooltools.renderx.com

Vardges