Package org.opencms.pdftools
Class CmsPdfConverter
- java.lang.Object
-
- org.opencms.pdftools.CmsPdfConverter
-
public class CmsPdfConverter extends java.lang.Object
This class uses the flying-saucer library to convert an XHTML document to a PDF document.
-
-
Constructor Summary
Constructors Constructor Description CmsPdfConverter()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
convertXhtmlToPdf(CmsObject cms, byte[] xhtmlData, java.lang.String uri)
Converts XHTML data to a PDF document.
-
-
-
Constructor Detail
-
CmsPdfConverter
public CmsPdfConverter()
Creates a new instance.
-
-
Method Detail
-
convertXhtmlToPdf
public byte[] convertXhtmlToPdf(CmsObject cms, byte[] xhtmlData, java.lang.String uri) throws java.lang.Exception
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:
java.lang.Exception
- if something goes wrong
-
-