SharedContext.setUserAgentCallback
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.xhtmlrenderer.layout.SharedContext.setUserAgentCallback(Showing top 6 results out of 315)

origin: org.xhtmlrenderer/flying-saucer-pdf

public ITextRenderer(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent) {
  _dotsPerPoint = dotsPerPoint;
  _outputDevice = outputDevice;
  _sharedContext = new SharedContext();
  _sharedContext.setUserAgentCallback(userAgent);
  _sharedContext.setCss(new StyleReference(userAgent));
  userAgent.setSharedContext(_sharedContext);
  _outputDevice.setSharedContext(_sharedContext);
  ITextFontResolver fontResolver = new ITextFontResolver(_sharedContext);
  _sharedContext.setFontResolver(fontResolver);
  ITextReplacedElementFactory replacedElementFactory = new ITextReplacedElementFactory(_outputDevice);
  _sharedContext.setReplacedElementFactory(replacedElementFactory);
  _sharedContext.setTextRenderer(new ITextTextRenderer());
  _sharedContext.setDPI(72 * _dotsPerPoint);
  _sharedContext.setDotsPerPixel(dotsPerPixel);
  _sharedContext.setPrint(true);
  _sharedContext.setInteractive(false);
  _timeouted= false;
}
origin: org.xhtmlrenderer/flying-saucer-pdf-itext5

public ITextRenderer(float dotsPerPoint, int dotsPerPixel) {
  _dotsPerPoint = dotsPerPoint;
  _outputDevice = new ITextOutputDevice(_dotsPerPoint);
  ITextUserAgent userAgent = new ITextUserAgent(_outputDevice);
  _sharedContext = new SharedContext();
  _sharedContext.setUserAgentCallback(userAgent);
  _sharedContext.setCss(new StyleReference(userAgent));
  userAgent.setSharedContext(_sharedContext);
  _outputDevice.setSharedContext(_sharedContext);
  ITextFontResolver fontResolver = new ITextFontResolver(_sharedContext);
  _sharedContext.setFontResolver(fontResolver);
  ITextReplacedElementFactory replacedElementFactory = new ITextReplacedElementFactory(_outputDevice);
  _sharedContext.setReplacedElementFactory(replacedElementFactory);
  _sharedContext.setTextRenderer(new ITextTextRenderer());
  _sharedContext.setDPI(72 * _dotsPerPoint);
  _sharedContext.setDotsPerPixel(dotsPerPixel);
  _sharedContext.setPrint(true);
  _sharedContext.setInteractive(false);
}
origin: org.xhtmlrenderer/flying-saucer-core

g2r.getSharedContext().setDPI(72f);
g2r.getSharedContext().getTextRenderer().setSmoothingThreshold(0);
g2r.getSharedContext().setUserAgentCallback(panel.getSharedContext().getUserAgentCallback());
g2r.setDocument(panel.getDocument(), panel.getSharedContext().getUac().getBaseURL());
g2r.getSharedContext().setReplacedElementFactory(panel.getSharedContext().getReplacedElementFactory());
origin: org.xhtmlrenderer/flying-saucer-pdf

public ITextRenderer(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent) {
  _dotsPerPoint = dotsPerPoint;
  _outputDevice = outputDevice;
  _sharedContext = new SharedContext();
  _sharedContext.setUserAgentCallback(userAgent);
  _sharedContext.setCss(new StyleReference(userAgent));
  userAgent.setSharedContext(_sharedContext);
  _outputDevice.setSharedContext(_sharedContext);
  ITextFontResolver fontResolver = new ITextFontResolver(_sharedContext);
  _sharedContext.setFontResolver(fontResolver);
  ITextReplacedElementFactory replacedElementFactory = new ITextReplacedElementFactory(_outputDevice);
  _sharedContext.setReplacedElementFactory(replacedElementFactory);
  _sharedContext.setTextRenderer(new ITextTextRenderer());
  _sharedContext.setDPI(72 * _dotsPerPoint);
  _sharedContext.setDotsPerPixel(dotsPerPixel);
  _sharedContext.setPrint(true);
  _sharedContext.setInteractive(false);
  _timeouted= false;
}
origin: org.xhtmlrenderer/flying-saucer-core

g2r.getSharedContext().setDPI(72f);
g2r.getSharedContext().getTextRenderer().setSmoothingThreshold(0);
g2r.getSharedContext().setUserAgentCallback(panel.getSharedContext().getUserAgentCallback());
g2r.setDocument(panel.getDocument(), panel.getSharedContext().getUac().getBaseURL());
g2r.getSharedContext().setReplacedElementFactory(panel.getSharedContext().getReplacedElementFactory());
origin: org.xhtmlrenderer/core-renderer

g2r.getSharedContext().setDPI(72f);
g2r.getSharedContext().getTextRenderer().setSmoothingThreshold(0);
g2r.getSharedContext().setUserAgentCallback(panel.getSharedContext().getUserAgentCallback());
g2r.setDocument(panel.getDocument(), panel.getSharedContext().getUac().getBaseURL());
g2r.getSharedContext().setReplacedElementFactory(panel.getSharedContext().getReplacedElementFactory());
org.xhtmlrenderer.layoutSharedContextsetUserAgentCallback

Popular methods of SharedContext

  • <init>
    Constructor for the Context object
  • getDotsPerPixel
  • getTextRenderer
  • setDotsPerPixel
  • setReplacedElementFactory
  • getBoxById
  • getCss
  • getFontResolver
    Gets the fontResolver attribute of the Context object
  • getNamespaceHandler
  • getUac
    Gets the uac attribute of the RenderingContext object
  • getUserAgentCallback
  • newLayoutContextInstance
  • getUserAgentCallback,
  • newLayoutContextInstance,
  • newRenderingContextInstance,
  • reset,
  • setBaseURL,
  • setCss,
  • setDPI,
  • setFontResolver,
  • setInteractive,
  • setNamespaceHandler

Popular classes and methods

  • getOriginalFilename (MultipartFile)
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • HashSet (java.util)
    This class implements the Set interface, backed by a java.util.HashMap.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • BoxLayout (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)