Package org.pdfclown.documents.contents.composition

Examples of org.pdfclown.documents.contents.composition.PrimitiveComposer.showText()


        false
        ),
      120
      );
    // Show the text!
    composer.showText(
      "PDFClown",
      new Point2D.Double(
        0,
        templateSize.getHeight() - composer.getState().getFont().getAscent(composer.getState().getFontSize())
        )
View Full Code Here


      DeviceRGBColor.White
      );
    composer.beginLocalState();
    composer.translate((float)templateSize.getWidth() - 20, 20);
    composer.rotate(90);
    composer.showText("Generated by PDF Clown on " + (new Date()));
    composer.translate(0,-8);
    composer.showText("For more info, visit http://www.pdfclown.org");
    composer.end();
    // End the graphics state!
    composer.end();
View Full Code Here

    composer.beginLocalState();
    composer.translate((float)templateSize.getWidth() - 20, 20);
    composer.rotate(90);
    composer.showText("Generated by PDF Clown on " + (new Date()));
    composer.translate(0,-8);
    composer.showText("For more info, visit http://www.pdfclown.org");
    composer.end();
    // End the graphics state!
    composer.end();

    composer.flush();
View Full Code Here

        );
    }
    catch(Exception e)
    {}
    composer.drawPolygon(
      composer.showText(
        "Text frame",
        new Point2D.Double(150,360),
        AlignmentXEnum.Left,
        AlignmentYEnum.Middle,
        45
View Full Code Here

        );
    }
    catch(Exception e)
    {}
    composer.drawPolygon(
      composer.showText(
        "Text frame",
        new Point2D.Double(300,600),
        AlignmentXEnum.Center,
        AlignmentYEnum.Middle,
        -25
View Full Code Here

        composer.setFont(
          titleFont,
          FontBaseSize * (styleIndex == 0 ? 1.5f : 1)
          );
        composer.showText(
          fontFamily.name() + (bold ? " bold" : "") + (italic ? " italic" : ""),
          new Point2D.Double(x,y)
          );

        y += 40;
View Full Code Here

            pageSize = page.getSize();
            composer = new PrimitiveComposer(page);
            x = Margin; y = Margin;

            composer.setFont(titleFont,FontBaseSize);
            composer.showText(
              fontFamily.name() + " (continued)",
              new Point2D.Double(pageSize.getWidth() - Margin, y),
              AlignmentXEnum.Right,
              AlignmentYEnum.Top,
              0
View Full Code Here

          }

          try
          {
            // Show the current character (using the current standard Type 1 font)!
            composer.showText(
              new String(new char[]{(char)charCode}),
              new Point2D.Double(x,y)
              );
            x += FontBaseSize;
            if(x > pageSize.getWidth() - Margin)
View Full Code Here

    /*
      NOTE: PrimitiveComposer's showText() method is the most basic way
      to add text to a page -- see BlockComposer for more advanced uses
      (horizontal and vertical alignment, hyphenation, etc.).
    */
    composer.showText(
      "Hello World!",
      new Point2D.Double(32,48)
      );

    // 4. Flush the contents into the page!
View Full Code Here

          false,
          false
          ),
        getFontSize()
        );
      composer.showText(
        (String)field.getValue(),
        new Point2D.Double(0,size.getHeight()/2),
        AlignmentXEnum.Left,
        AlignmentYEnum.Middle,
        0
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.