Package com.xpn.xwiki.pdf.api
Interface PdfExport
-
- All Known Implementing Classes:
PdfExportImpl
public interface PdfExport
PDF Exporter, converts a wikiDocument
into PDF.- Version:
- $Id: 01bf2263a9d0da1c2813faa06dd8c1fe569c4582 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PdfExport.ExportType
Describes export types.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
export(XWikiDocument doc, OutputStream out, PdfExport.ExportType type, XWikiContext context)
Export a wiki Document into PDF or RTF.void
exportHtml(String html, OutputStream out, PdfExport.ExportType type, XWikiContext context)
Convert an HTML document to PDF.void
exportToPDF(XWikiDocument doc, OutputStream out, XWikiContext context)
Export a wiki Document into PDF.
-
-
-
Method Detail
-
exportToPDF
void exportToPDF(XWikiDocument doc, OutputStream out, XWikiContext context) throws XWikiException
Export a wiki Document into PDF. Seeexport(XWikiDocument, OutputStream, ExportType, XWikiContext)
for more details about the conversion process.- Parameters:
doc
- the document to exportout
- where to write the resulting documentcontext
- the current request context- Throws:
XWikiException
- if the conversion fails for any reason- See Also:
export(XWikiDocument, OutputStream, ExportType, XWikiContext)
-
export
void export(XWikiDocument doc, OutputStream out, PdfExport.ExportType type, XWikiContext context) throws XWikiException
Export a wiki Document into PDF or RTF. The content of the document is rendered into HTML using thepdf.vm
template, the resulting HTML is cleaned up into valid XHTML, and custom CSS is applied to it. The XHTML document is transformed into an XSL-FO document, which is finally processed using Apache FOP.- Parameters:
doc
- the document to exportout
- where to write the resulting documenttype
- the type of the output: PDF or RTFcontext
- the current request context- Throws:
XWikiException
- if the conversion fails for any reason
-
exportHtml
void exportHtml(String html, OutputStream out, PdfExport.ExportType type, XWikiContext context) throws XWikiException
Convert an HTML document to PDF. The HTML is cleaned up, and CSS style is applied to it.- Parameters:
html
- the source document to transformout
- where to write the resulting documenttype
- the type of the output: PDF or RTFcontext
- the current request context- Throws:
XWikiException
- if the conversion fails for any reason
-
-