Class AbstractBrowserPDFPrinter

  • All Implemented Interfaces:
    PDFPrinter<URL>

    @Unstable
    public abstract class AbstractBrowserPDFPrinter
    extends Object
    implements PDFPrinter<URL>
    Base class for PDFPrinter implementations that rely on a web browser to perform the PDF printing.
    Since:
    14.8
    Version:
    $Id: b075136d6d58b8b7b34bffde62a432a671a6fbef $
    • Field Detail

      • logger

        @Inject
        protected org.slf4j.Logger logger
    • Constructor Detail

      • AbstractBrowserPDFPrinter

        public AbstractBrowserPDFPrinter()
    • 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 interface PDFPrinter<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 interface PDFPrinter<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