Class OutputHandler

    • Constructor Summary

      Constructors 
      Constructor Description
      OutputHandler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endBlock​(Block block)
      Invoked when PDFxStream has finished processing a Block.
      void endLine​(Line line)
      Invoked when PDFxStream has finished processing a Line.
      void endPage​(Page page)
      Invoked when PDFxStream has finished processing a page
      void endPDF​(String pdfName, File pdfFile)
      Invoked when PDFxStream has finished processing a PDF.
      void endSpan​(Span s)
      Invoked when PDFxStream has finished processing a Span
      void linebreaks​(int linebreakCnt)
      Invoked when PDFxStream determines that a series of line breaks should be outputted between the previous entity (page, block, line, etc) and the next entity (page, block, line, etc).
      void spaces​(int spaceCnt)
      Invoked when PDFxStream determines that a series of spaces should be outputted between the previous entity (block, line, text unit, etc) and the next entity (block, line, text unit, etc).
      void startBlock​(Block block)
      Invoked when a Block is about to be processed.
      void startLine​(Line line)
      Invoked when a Line is about to be processed.
      void startPage​(Page page)
      Invoked when a page is about to be processed.
      void startPDF​(String pdfName, File pdfFile)
      Invoked when a new PDF is about to be processed.
      void startSpan​(Span s)
      Invoked when a Span is about to be processed
      void textUnit​(TextUnit tu)
      Invoked when a run of characters is to be outputted, as represented by the given TextUnit instance.
    • Constructor Detail

      • OutputHandler

        public OutputHandler()
    • Method Detail

      • startPDF

        public void startPDF​(String pdfName,
                             File pdfFile)
        Invoked when a new PDF is about to be processed.
        Parameters:
        pdfName - the 'name' of the PDF document, as provided by Document.getName() }
        pdfFile - the file reference PDFxStream is about to begin processing. This reference may be null if the source Document is not reading from a File or InputStream.
      • endPDF

        public void endPDF​(String pdfName,
                           File pdfFile)
        Invoked when PDFxStream has finished processing a PDF.
        Parameters:
        pdfName - the 'name' of the PDF document, as provided by Document.getName() }
        pdfFile - the file reference PDFxStream has finished processing
      • startPage

        public void startPage​(Page page)
        Invoked when a page is about to be processed.
        Parameters:
        page - a reference to the Page that is about to be processed
      • endPage

        public void endPage​(Page page)
        Invoked when PDFxStream has finished processing a page
        Parameters:
        page - a reference to the Page that has been processed
      • startBlock

        public void startBlock​(Block block)
        Invoked when a Block is about to be processed.
        Parameters:
        block - a reference to the Block that is about to be processed
      • endBlock

        public void endBlock​(Block block)
        Invoked when PDFxStream has finished processing a Block.
        Parameters:
        block - a reference to the Page that has been processed
      • startLine

        public void startLine​(Line line)
        Invoked when a Line is about to be processed.
        Parameters:
        line - a reference to the Line that is about to be processed
      • endLine

        public void endLine​(Line line)
        Invoked when PDFxStream has finished processing a Line.
        Parameters:
        line - a reference to the Line that has been processed
      • startSpan

        public void startSpan​(Span s)
        Invoked when a Span is about to be processed
      • endSpan

        public void endSpan​(Span s)
        Invoked when PDFxStream has finished processing a Span
      • textUnit

        public void textUnit​(TextUnit tu)
        Invoked when a run of characters is to be outputted, as represented by the given TextUnit instance.
      • spaces

        public void spaces​(int spaceCnt)
        Invoked when PDFxStream determines that a series of spaces should be outputted between the previous entity (block, line, text unit, etc) and the next entity (block, line, text unit, etc).
        Parameters:
        spaceCnt - the number of spaces that PDFxStream recommends should be outputted
      • linebreaks

        public void linebreaks​(int linebreakCnt)
        Invoked when PDFxStream determines that a series of line breaks should be outputted between the previous entity (page, block, line, etc) and the next entity (page, block, line, etc).
        Parameters:
        linebreakCnt - the number of line breaks that PDFxStream recommends should be outputted