Package org.xwiki.export.pdf.job
Class PDFExportJobRequest
- java.lang.Object
-
- org.xwiki.job.AbstractRequest
-
- org.xwiki.job.api.AbstractCheckRightsRequest
-
- org.xwiki.export.pdf.job.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 Summary
Constructors Constructor Description PDFExportJobRequest()Default constructor.PDFExportJobRequest(org.xwiki.job.Request request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.xwiki.model.reference.DocumentReference>getDocuments()org.xwiki.model.reference.DocumentReferencegetTemplate()booleanisServerSide()booleanisWithCover()booleanisWithFooter()booleanisWithHeader()booleanisWithToc()voidsetDocuments(List<org.xwiki.model.reference.DocumentReference> documents)Sets the list of documents to export as PDF.voidsetServerSide(boolean serverSide)Sets whether to generate the PDF file server-side, as a temporary resource, or client-side.voidsetTemplate(org.xwiki.model.reference.DocumentReference template)Sets the PDF template.voidsetWithCover(boolean withCover)Sets whether to generate the cover page or not.voidsetWithFooter(boolean withFooter)Sets whether to generate the page footer or not.voidsetWithHeader(boolean withHeader)Sets whether to generate the page header or not.voidsetWithToc(boolean withToc)Sets whether to generate the table of contents page or not.-
Methods inherited from class org.xwiki.job.api.AbstractCheckRightsRequest
getAuthorReference, getUserReference, isCheckAuthorRights, isCheckRights, setAuthorReference, setCheckAuthorRights, setCheckRights, setUserReference
-
Methods inherited from class org.xwiki.job.AbstractRequest
containsProperty, equals, getContext, getId, getProperties, getProperty, getProperty, getPropertyNames, hashCode, isInteractive, isRemote, isStatusLogIsolated, isStatusSerialized, isVerbose, removeProperty, setContext, setId, setId, setId, setInteractive, setProperty, setRemote, setStatusLogIsolated, setStatusSerialized, setVerbose
-
-
-
-
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-trueto generate the cover page,falseotherwise
-
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-trueto generate the table of contents page,falseotherwise
-
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-trueto generate the page header,falseotherwise
-
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-trueto generate the page footer,falseotherwise
-
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-trueto generate the PDF file server-side,falseto let the users print the PDF file themselves
-
-