advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Download the code for this article
Do you use Cocoon already? If not, did this article convince you to try it? What other Cocoon features are you using? May users dislike PDF files. In light of that, how useful is exporting XML documents to PDF to you? Let us know in the Open Source discussion forum on DevX.
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Publishing XML Documents in PDF and HTML with Cocoon

Sure, you can create a custom framework for multi-format publishing, but why bother? It's already been done. Take advantage of Apache Cocoon's ability to deliver PDF and HTML documents on demand. 


advertisement
his article shows you how to publish XML documents in PDF using Apache Cocoon. Cocoon can create result documents in a variety of formats, including HTML and PDF. Cocoon's popularity reflects that of the Adobe's PDF format, which most vendors prefer for e-mailing richly formatted printable documents and reports. Cocoon converts not only text content, but also graphs and images. This article focuses on using Cocoon to dynamically generate HTML and PDF.


Although there are alternatives for generating PDF, Cocoon is preferred because it provides various value-added features. For example, the Cocoon site says: "Cocoon interacts with many data sources, including file systems, RDBMS, LDAP, native XML databases, SAP systems, and network-based data sources. It adapts content delivery to the capabilities of different devices like HTML, WML, PDF, SVG, and RTF, to name just a few. You can run Cocoon as a Servlet as well as through a powerful, command line interface. The deliberate design of its abstract environment gives you the freedom to extend its functionality to meet your special needs in a highly modular fashion." You can find a complete feature list at http://cocoon.apache.org/2.1/features.html.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement