org.apache.fop.render.pdf.pdfbox

## Class Interceptors

- java.lang.Object
- - org.apache.fop.render.pdf.pdfbox.Interceptors

-     public class Interceptors
      extends java.lang.Object

  Handles interceptors (hooks) that can operate on PDF documents.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Interceptors()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Interceptors` | `getInstance()`
    `org.apache.pdfbox.pdmodel.PDDocument` | `interceptOnLoad(org.apache.pdfbox.pdmodel.PDDocument doc, java.net.URI uri)` Intercepts the given PDF document on load.
    `void` | `setOnLoad(OnLoadInterceptor interceptor)` Set the on-load interceptor.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Interceptors

          public Interceptors()

  - ### Method Detail

    - #### getInstance

          public static Interceptors getInstance()

    - #### interceptOnLoad

          public org.apache.pdfbox.pdmodel.PDDocument interceptOnLoad(org.apache.pdfbox.pdmodel.PDDocument doc,
                                                                      java.net.URI uri)
                                                               throws java.io.IOException

      Intercepts the given PDF document on load.
      Parameters:
        `doc` - the PDF document
        `uri` - the URI it has been loaded from (may be null)
      Returns:
        the given document or potentially an alternative PDF
      Throws:
        `java.io.IOException` - if an I/O occurs
      See Also:
        `OnLoadInterceptor.intercept(PDDocument, URI)`

    - #### setOnLoad

          public void setOnLoad(OnLoadInterceptor interceptor)

      Set the on-load interceptor.
      Parameters:
        `interceptor` - the interceptor instance

Copyright 2007-2022 The Apache Software Foundation. All Rights Reserved.