Class PDFExportJobRequest

  • All Implemented Interfaces:
    Serializable, org.xwiki.job.Request

    @Unstable
    public class PDFExportJobRequest
    extends AbstractCheckRightsRequest
    Represents a request to export multiple XWiki documents as PDF.
    Since:
    14.4.2, 14.5
    Version:
    $Id: b6b2ad83915a5f1c8526f616a8502ba8df69ff06 $
    See Also:
    Serialized Form
    • Constructor Detail

      • PDFExportJobRequest

        public PDFExportJobRequest()
        Default constructor.
      • PDFExportJobRequest

        public PDFExportJobRequest​(org.xwiki.job.Request request)
        Parameters:
        request - the request to copy
        Since:
        14.7RC1, 14.4.4, 13.10.9
    • Method Detail

      • getDocuments

        public List<org.xwiki.model.reference.DocumentReference> getDocuments()
        Returns:
        the list of documents to include in the PDF export; the PDF export job will render each of these documents to HTML and aggregate the results using the PDF template, printing the result to PDF in the end; the first document in the list is considered the main document and will be used to generate the cover page, table of contents, header and footer
      • setDocuments

        public void setDocuments​(List<org.xwiki.model.reference.DocumentReference> documents)
        Sets the list of documents to export as PDF.
        Parameters:
        documents - the list of documents to export as PDF
      • getTemplate

        public org.xwiki.model.reference.DocumentReference getTemplate()
        Returns:
        the PDF template reference, i.e. the document that controls what is displayed in the cover page, table of contents, header and footer, as well as the styles used when generating the PDF; the PDF template should have an object of type XWiki.PDFExport.TemplateClass
      • setTemplate

        public void setTemplate​(org.xwiki.model.reference.DocumentReference template)
        Sets the PDF template.
        Parameters:
        template - the PDF template to use
      • isWithCover

        public boolean isWithCover()
        Returns:
        whether to generate the cover page or not
      • setWithCover

        public void setWithCover​(boolean withCover)
        Sets whether to generate the cover page or not.
        Parameters:
        withCover - true to generate the cover page, false otherwise
      • isWithToc

        public boolean isWithToc()
        Returns:
        whether to generate the table of contents page or not
      • setWithToc

        public void setWithToc​(boolean withToc)
        Sets whether to generate the table of contents page or not.
        Parameters:
        withToc - true to generate the table of contents page, false otherwise
      • isWithHeader

        public boolean isWithHeader()
        Returns:
        whether to generate the page header or not
      • setWithHeader

        public void setWithHeader​(boolean withHeader)
        Sets whether to generate the page header or not.
        Parameters:
        withHeader - true to generate the page header, false otherwise
      • isWithFooter

        public boolean isWithFooter()
        Returns:
        whether to generate the page footer or not
      • setWithFooter

        public void setWithFooter​(boolean withFooter)
        Sets whether to generate the page footer or not.
        Parameters:
        withFooter - true to generate the page footer, false otherwise
      • isServerSide

        public boolean isServerSide()
        Returns:
        whether to generate the PDF file server-side, as a temporary resource (using a headless browser), or client-side using the user's browser
      • setServerSide

        public void setServerSide​(boolean serverSide)
        Sets whether to generate the PDF file server-side, as a temporary resource, or client-side.
        Parameters:
        serverSide - true to generate the PDF file server-side, false to let the users print the PDF file themselves