Package org.xhtmlrenderer.pdf
Class ITextUserAgent
java.lang.Object
org.xhtmlrenderer.swing.NaiveUserAgent
org.xhtmlrenderer.pdf.ITextUserAgent
- All Implemented Interfaces:
DocumentListener,UserAgentCallback
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ITextOutputDeviceprivate final intprivate static final intFields inherited from class org.xhtmlrenderer.swing.NaiveUserAgent
_imageCache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intgetImageResource(String uriStr) Retrieves the image located at the given URI.private ImageResourceprivate @Nullable ImageResourceloadImageResource(String uriStr) private voidscaleToOutputResolution(com.lowagie.text.Image image) Methods inherited from class org.xhtmlrenderer.swing.NaiveUserAgent
clearImageCache, createImageResource, documentLoaded, documentStarted, getBaseURL, getBinaryResource, getCSSResource, getXMLResource, isVisited, needsRedirect, onHttpConnection, onLayoutException, onRenderException, openConnection, openStream, resolveAndOpenStream, resolveURI, setBaseURL, shrinkImageCache
-
Field Details
-
IMAGE_CACHE_CAPACITY
private static final int IMAGE_CACHE_CAPACITY- See Also:
-
_outputDevice
-
dotsPerPixel
private final int dotsPerPixel
-
-
Constructor Details
-
ITextUserAgent
-
-
Method Details
-
getDotsPerPixel
int getDotsPerPixel() -
getImageResource
Description copied from class:NaiveUserAgentRetrieves 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:
getImageResourcein interfaceUserAgentCallback- Overrides:
getImageResourcein classNaiveUserAgent- Parameters:
uriStr- Location of the image source.- Returns:
- An ImageResource containing the image.
-
loadImageResource
-
loadEmbeddedBase64ImageResource
-
scaleToOutputResolution
private void scaleToOutputResolution(com.lowagie.text.Image image)
-