Class PdfReader


public class PdfReader extends IntegrationReader
Obtains records from the rows of one table extracted from a PdfDocument, with one field per cell.
  • Constructor Details

    • PdfReader

      public PdfReader(PdfDocument pdfDocument)
      Creates a reader for a document that must already be opened when this reader opens.
  • Method Details

    • open

      public void open() throws DataException
      Description copied from class: DataEndpoint
      Makes this endpoint ready for reading or writing.
      Overrides:
      open in class IntegrationReader
      Throws:
      DataException
    • close

      public void close() throws DataException
      Description copied from class: DataEndpoint
      Indicates that this endpoint has finished reading or writing.
      Overrides:
      close in class DataEndpoint
      Throws:
      DataException
    • readImpl

      protected Record readImpl() throws Throwable
      Description copied from class: DataReader
      Overridden by subclasses to read the next record from this DataReader. The default implementation of DataReader.read() now insures that this method will not be called again after it returns a null.

      If no record is available, null will be returned.

      Contract for subclasses (see also docs/authoring/DataReader.md):

      Specified by:
      readImpl in class DataReader
      Throws:
      Throwable
    • isFieldNamesInFirstRow

      public boolean isFieldNamesInFirstRow()
      Indicates if the table's first row holds the field names instead of data (default is false).
    • setFieldNamesInFirstRow

      public PdfReader setFieldNamesInFirstRow(boolean fieldNamesInFirstRow)
      Indicates if the table's first row holds the field names instead of data (default is false).
    • getTableIndex

      public int getTableIndex()
      Returns the 0-based index, counted across the whole document, of the table to read (default is 0).
    • setTableIndex

      public PdfReader setTableIndex(int tableIndex)
      Sets the 0-based index, counted across the whole document, of the table to read (default is 0).
    • getDocumentStatistics

      public PdfDocumentStatistics getDocumentStatistics()
    • setAutoCloseDocument

      public PdfReader setAutoCloseDocument(boolean autoCloseDocument)
      Indicates if the PdfDocument should be closed when this endpoint is closed. The default is false.
    • isAutoCloseDocument

      public boolean isAutoCloseDocument()
      Indicates if the PdfDocument should be closed when this endpoint is closed. The default is false.
    • addExceptionProperties

      public DataException addExceptionProperties(DataException exception)
      Description copied from class: Endpoint
      Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.
      Overrides:
      addExceptionProperties in class DataReader