Interface XHTMLOfficeDocumentBuilder


  • @Role
    public interface XHTMLOfficeDocumentBuilder
    Component responsible for building XHTMLOfficeDocument objects from binary office files.
    Since:
    2.1M1
    Version:
    $Id: c83a21ba84584dc8e23041949161abb7d6933567 $
    • Method Detail

      • build

        XHTMLOfficeDocument build​(InputStream officeFileStream,
                                  String officeFileName,
                                  org.xwiki.model.reference.DocumentReference reference,
                                  boolean filterStyles)
                           throws OfficeImporterException
        Builds a XHTMLOfficeDocument corresponding to the specified office document.
        Parameters:
        officeFileStream - InputStream corresponding to the office document
        officeFileName - name of the office document (used to determine input document format)
        reference - reference document w.r.t which HTML cleaning is performed. If the office file contains images or other binary artifacts, HTML cleaning will be performed assuming that those artifacts are present as attachments to the reference document
        filterStyles - whether to filter CSS styles present in the HTML content produced by office server
        Returns:
        an XHTMLOfficeDocument corresponding to the office document
        Throws:
        OfficeImporterException - if an error occurs while performing the import operation
        Since:
        2.2M1