Class ITextUserAgent

java.lang.Object
org.xhtmlrenderer.swing.NaiveUserAgent
org.xhtmlrenderer.pdf.ITextUserAgent
All Implemented Interfaces:
DocumentListener, UserAgentCallback
Direct Known Subclasses:
PDFRender.ResourceLoaderUserAgent

@ParametersAreNonnullByDefault public class ITextUserAgent extends NaiveUserAgent
  • Field Details

    • IMAGE_CACHE_CAPACITY

      private static final int IMAGE_CACHE_CAPACITY
      See Also:
    • _outputDevice

      private final ITextOutputDevice _outputDevice
    • dotsPerPixel

      private final int dotsPerPixel
  • Constructor Details

    • ITextUserAgent

      public ITextUserAgent(ITextOutputDevice outputDevice, int dotsPerPixel)
  • Method Details

    • getDotsPerPixel

      int getDotsPerPixel()
    • getImageResource

      public ImageResource getImageResource(String uriStr)
      Description copied from class: NaiveUserAgent
      Retrieves the image located at the given URI. It's assumed the URI does point to an image--the URI will be accessed (using java.io or java.net), opened, read and then passed into the JDK image-parsing routines. The result is packed up into an ImageResource for later consumption.
      Specified by:
      getImageResource in interface UserAgentCallback
      Overrides:
      getImageResource in class NaiveUserAgent
      Parameters:
      uriStr - Location of the image source.
      Returns:
      An ImageResource containing the image.
    • loadEmbeddedBase64ImageResource

      private ImageResource loadEmbeddedBase64ImageResource(String uri)
    • scaleToOutputResolution

      private void scaleToOutputResolution(com.lowagie.text.Image image)