Examples of HtmlExporter


Examples of nl.lxtreme.ols.util.ExportUtils.HtmlExporter

   * @
   */
  @Test
  public void testHtmlDoc()
  {
    final HtmlExporter exporter = ExportUtils.createHtmlExporter();

    exporter
        .addCssStyle( "th { text-align:left;font-style:italic;font-weight:bold;font-size:medium;background-color:#C0C0FF; }" );

    final Element body = exporter.getBody();
    body.addChild( HtmlExporter.H2 ).addContent( "I2C Analysis results" );
    body.addChild( HtmlExporter.HR );
    body.addChild( HtmlExporter.DIV ).addAttribute( "style", "text-align: right; font-size: x-small;" ).addContent(
        "today" );
    body.addChild( HtmlExporter.P );

    final Element table = body.addChild( "table" ).addAttribute( "style", "width: 100%" );
    Element tr;

    tr = table.addChild( "tr" );
    tr.addChild( "td" ).addAttribute( "colspan", "2" ).addContent( "Bus configuration" );
    tr = table.addChild( "tr" );
    tr.addChild( "td" ).addAttribute( "style", "width:30%" ).addContent( "SDA" );
    tr.addChild( "td" ).addContent( "<auto detect>" );
    tr = table.addChild( "tr" );
    tr.addChild( "td" ).addAttribute( "style", "width:30%" ).addContent( "SCL" );
    tr.addChild( "td" ).addContent( "<auto detect>" );

    body.addChild( HtmlExporter.P ).addContent( " " );

    assertEquals(
        "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n"
            + "<html><head><title></title><style type='text/css'>th { text-align:left;font-style:italic;font-weight:bold;font-size:medium;background-color:#C0C0FF; }</style></head><body><h2>I2C Analysis results</h2><hr><div style='text-align: right; font-size: x-small;'>today</div><p></p><table style='width: 100%'><tr><td colspan='2'>Bus configuration</td></tr><tr><td style='width:30%'>SDA</td><td>&lt;auto detect&gt;</td></tr><tr><td style='width:30%'>SCL</td><td>&lt;auto detect&gt;</td></tr></table><p>&nbsp;</p></body></html>",
        exporter.toString() );
  }
View Full Code Here

Examples of org.arquillian.recorder.reporter.exporter.impl.HTMLExporter

        JAXBContext context = getContext();

        exporterRegister.get()
            .add(new XMLExporter(context))
            .add(new JSONExporter(context))
            .add(new HTMLExporter(context))
            .add(new AsciiDocExporter());

        reportTypeRegister.get()
            .add(new XMLReport())
            .add(new JSONReport())
View Full Code Here

Examples of org.docx4j.convert.out.html.HtmlExporter

        try {
      // Put the html in result
      org.w3c.dom.Document xhtmlDoc = org.docx4j.XmlUtils.neww3cDomDocument();
      javax.xml.transform.dom.DOMResult result = new javax.xml.transform.dom.DOMResult(xhtmlDoc);
     
      AbstractHtmlExporter exporter = new HtmlExporter();
      exporter.html(wordMLPackage, result, false,
          System.getProperty("java.io.tmpdir") ); // false -> don't use HTML fonts.
         
      // Now render the XHTML
      org.xhtmlrenderer.pdf.ITextRenderer renderer = new org.xhtmlrenderer.pdf.ITextRenderer();
         
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.