org.faceless.pdf2

## Class LinearizedException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.faceless.pdf2.LinearizedException

- All Implemented Interfaces:
    Serializable

      public class LinearizedException
      extends RuntimeException

  This exception is thrown when there is a problem completing the load of a Linearized PDF. It's a `RuntimeException`, but usually wraps an `IOException` and if the PDF has been loaded from a Linearized `PDFReader` (usually from a URL) then potentially it can be thrown at any time throughout the life of the PDF.

  As an example, say the PDF is Linearized and has a valid structure, but the second page is damaged. The PDF constructor will complete and the first page can be accessed without exception, but requesting the second page will cause a load and at this point the API determines the file is damaged. Because the PDF object structure has already been created (and possibly even modified by the user), it's impossible to repair at this point. So we will throw a `LinearizedException` and the PDF object must be discarded.

  This is an inevitable consequence of using a Linearized load. If there is any doubt about the documents structure, Linearized loading should not be used.

  For documents not loaded using linearization this Exception will never be thrown.

  Since:
    2.14
  See Also:
    `PDFReader.setSource(java.net.URL)`, `LoadState`, Serialized Form

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isFatal()` Return true if the exception is fatal, which indicates the entire PDF object structure must be considered invalid.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### isFatal

          public boolean isFatal()

      Return true if the exception is fatal, which indicates the entire PDF object structure must be considered invalid.

Copyright © 2001-2015 Big Faceless Organization