Package org.apache.fop.render.ps

Examples of org.apache.fop.render.ps.NativeTextHandler


      FontInfo fontInfo = PDFDocumentGraphics2DConfigurator.createFontInfo(c, false);

      OutputStream out = new FileOutputStream("example_eps.eps");
      EPSDocumentGraphics2D g2d = new EPSDocumentGraphics2D(false);
      g2d.setGraphicContext(new GraphicContext());
      g2d.setCustomTextHandler(new NativeTextHandler(g2d, fontInfo));
      g2d.setupDocument(out, 200, 100);
      g2d.setFont(new Font("Arial", Font.PLAIN, 12));
      g2d.drawString("Hi there Arial", 50, 50);
      g2d.finish();
      out.close();
View Full Code Here


  public static void main(String[] args) {
    try {
      OutputStream out = new FileOutputStream("example_eps_simple.eps");
      EPSDocumentGraphics2D g2d = new EPSDocumentGraphics2D(false);
      g2d.setGraphicContext(new GraphicContext());
      g2d.setCustomTextHandler(new NativeTextHandler(g2d, null));
      g2d.setupDocument(out, 200, 100);
      g2d.setFont(new Font("Helvetica", Font.PLAIN, 12));
      g2d.drawString("Hi there Helvetica", 50, 50);
      g2d.finish();
      out.close();
View Full Code Here

TOP

Related Classes of org.apache.fop.render.ps.NativeTextHandler

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.