Package org.xwiki.export.pdf.browser
Class AbstractBrowserPDFPrinter
- java.lang.Object
-
- org.xwiki.export.pdf.browser.AbstractBrowserPDFPrinter
-
- All Implemented Interfaces:
PDFPrinter<URL>
@Unstable public abstract class AbstractBrowserPDFPrinter extends Object implements PDFPrinter<URL>
Base class forPDFPrinter
implementations that rely on a web browser to perform the PDF printing.- Since:
- 14.8
- Version:
- $Id: b075136d6d58b8b7b34bffde62a432a671a6fbef $
-
-
Field Summary
Fields Modifier and Type Field Description protected PDFExportConfiguration
configuration
protected org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description AbstractBrowserPDFPrinter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract BrowserManager
getBrowserManager()
protected abstract javax.servlet.http.HttpServletRequest
getRequest()
boolean
isAvailable()
InputStream
print(URL printPreviewURL)
Prints the specified data as PDF.
-
-
-
Field Detail
-
logger
@Inject protected org.slf4j.Logger logger
-
configuration
@Inject protected PDFExportConfiguration configuration
-
-
Method Detail
-
print
public InputStream print(URL printPreviewURL) throws IOException
Description copied from interface:PDFPrinter
Prints the specified data as PDF.- Specified by:
print
in interfacePDFPrinter<URL>
- Parameters:
printPreviewURL
- the data to be printed as PDF- Returns:
- the PDF input stream
- Throws:
IOException
-
isAvailable
public boolean isAvailable()
- Specified by:
isAvailable
in interfacePDFPrinter<URL>
- Returns:
true
if this PDF printer is ready to be used,false
otherwise
-
getBrowserManager
protected abstract BrowserManager getBrowserManager()
- Returns:
- the browser manager used to interact with the browser used for PDF printing
-
getRequest
protected abstract javax.servlet.http.HttpServletRequest getRequest()
- Returns:
- the current HTTP servlet request, used to take the cookies from
-
-