com.xpn.xwiki.pdf.api
Interface PdfExport

All Known Implementing Classes:
PdfExportImpl

public interface PdfExport

PDF Exporter, converts a wiki Document into PDF.

Version:
$Id: 81a955dd4423e24e42bc258106739463f668e4c9 $

Nested Class Summary
static class PdfExport.ExportType
          Describes export types.
 
Method Summary
 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. See export(XWikiDocument, OutputStream, ExportType, XWikiContext) for more details about the conversion process.

Parameters:
doc - the document to export
out - where to write the resulting document
context - 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 the pdf.vm template, the resulting HTML is cleaned up into valid XHTML using JTidy, 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 export
out - where to write the resulting document
type - the type of the output: PDF or RTF
context - 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 transform
out - where to write the resulting document
type - the type of the output: PDF or RTF
context - the current request context
Throws:
XWikiException - if the conversion fails for any reason


Copyright © 2004-2013 XWiki. All Rights Reserved.