Package com.itextpdf.tool.xml.parser

Examples of com.itextpdf.tool.xml.parser.XMLParser


    // Pipelines
    PdfWriterPipeline pdf = new PdfWriterPipeline(doc, writer);
    HtmlPipeline html = new HtmlPipeline(htmlContext, pdf);
    CssResolverPipeline css = new CssResolverPipeline(cssResolver, html);
    XMLWorker worker = new XMLWorker(css, true);
    XMLParser p = new XMLParser(worker);
    p.parse(contentIs, true);
    Long parse = (new Date()).getTime();
    LOG.debug("PDF Output - JSConverter: " + (rhino - start) + "ms PDF Render: " + (parse - rhino) + "ms");
  }
View Full Code Here


      CSSResolver cssResolver = workerHelper.getDefaultCssResolver(true);

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

      XMLWorker worker = new XMLWorker(pipeline, true);
      XMLParser parser = new XMLParser(worker);

      if (source instanceof InputStream) {
        parser.parse((InputStream) source, cCharset);
      } else if (source instanceof Reader) {
        parser.parse((Reader) source);
      } else {
        StringReader reader = new StringReader((String) source);
        parser.parse(reader);
      }

      document.close();

      return new DocumentOutput(new ByteArrayInputStream(outputStream.toByteArray()));
View Full Code Here

TOP

Related Classes of com.itextpdf.tool.xml.parser.XMLParser

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.