Package com.itextpdf.tool.xml

Examples of com.itextpdf.tool.xml.XMLWorkerHelper


        writer.setMargins(this.getMargin(marginLeft), this.getMargin(marginRight), this.getMargin(marginTop), this.getMargin(marginBottom));
      }

      document.open();

      XMLWorkerHelper workerHelper = XMLWorkerHelper.getInstance();

      HtmlPipelineContext htmlContext = new HtmlPipelineContext(null);
      htmlContext.setTagFactory(Tags.getHtmlTagProcessorFactory());

      if (Conditions.isNotEmpty(imagesRootPath)) {
        htmlContext.setImageProvider(new AbstractImageProvider() {

          @Override
          public String getImageRootPath() {

            return imagesRootPath;

          }

        });
      }

      HtmlPipeline htmlPipeline = new HtmlPipeline(htmlContext, new PdfWriterPipeline(document, writer));

      CSSResolver cssResolver = workerHelper.getDefaultCssResolver(true);

      Pipeline<?> pipeline = new CssResolverPipeline(cssResolver, htmlPipeline);

      XMLWorker worker = new XMLWorker(pipeline, true);
      XMLParser parser = new XMLParser(worker);
View Full Code Here

TOP

Related Classes of com.itextpdf.tool.xml.XMLWorkerHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.