Top Fields Constructors Methods
com.openhtmltopdf.pdfboxout

public Class PdfBoxUserAgent

extends NaiveUserAgent
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, .InputStream, java.util.Locale, java.util.logging.Level, com.openhtmltopdf.layout.SharedContext, com.openhtmltopdf.resource.ImageResource, com.openhtmltopdf.swing.NaiveUserAgent, com.openhtmltopdf.util.LogMessageId, .XRLog

Field Summary

Modifier and TypeField and Description
private final PdfBoxOutputDevice
private SharedContext
Inherited from com.openhtmltopdf.swing.NaiveUserAgent:
_accessControllers_baseUri_imageCache_protocolsStreamFactory_resolverDEFAULT_URI_RESOLVER

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ImageResource
getImageResource(String
Location of the image
uriStr
)

Overrides default com.openhtmltopdf.extend.UserAgentCallback.getImageResource.

Retrieves the Image at the given URI.

public SharedContext
private byte[]
private void
public void
Inherited from com.openhtmltopdf.swing.NaiveUserAgent:
checkAccessAllowedclearImageCachedocumentLoadeddocumentStartedextractProtocolgetBaseURLgetBinaryResourcegetCSSResourcegetDefaultUriResolvergetImageResourcegetProtocolFactorygetXMLResourcehasProtocolFactoryisVisitedonLayoutExceptiononRenderExceptionopenReaderopenStreamreadAllresolveURIresolveUrisetAccessControllersetBaseURLsetProtocolsStreamFactorysetUriResolver

Field Detail

_outputDeviceback to summary
private final PdfBoxOutputDevice _outputDevice
_sharedContextback to summary
private SharedContext _sharedContext

Constructor Detail

PdfBoxUserAgentback to summary
public PdfBoxUserAgent(PdfBoxOutputDevice outputDevice)

Method Detail

getImageResourceback to summary
public ImageResource getImageResource(String uriStr)

Overrides default com.openhtmltopdf.extend.UserAgentCallback.getImageResource.

Doc from com.openhtmltopdf.extend.UserAgentCallback.getImageResource.

Retrieves the Image at the given URI. This is a synchronous call.

Parameters
uriStr:String

Location of the image

Returns:ImageResource

An ImageResource for the content at the URI.

getSharedContextback to summary
public SharedContext getSharedContext()
readStreamback to summary
private byte[] readStream(InputStream is) throws IOException
scaleToOutputResolutionback to summary
private void scaleToOutputResolution(PdfBoxImage image)
setSharedContextback to summary
public void setSharedContext(SharedContext sharedContext)