Package org.opencms.pdftools
Class CmsPdfConverter
java.lang.Object
org.opencms.pdftools.CmsPdfConverter
This class uses the flying-saucer library to convert an XHTML document to a PDF document.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
convertXhtmlToPdf
(CmsObject cms, byte[] xhtmlData, String uri) Converts XHTML data to a PDF document.
-
Constructor Details
-
CmsPdfConverter
public CmsPdfConverter()Creates a new instance.
-
-
Method Details
-
convertXhtmlToPdf
Converts XHTML data to a PDF document.- Parameters:
cms
- the current CMS contextxhtmlData
- the XHTML as a byte arrayuri
- the uri to use for error messages in the XML parser- Returns:
- the PDF data as a byte array
- Throws:
Exception
- if something goes wrong
-