Package org.pdfclown.documents.contents.composition

Examples of org.pdfclown.documents.contents.composition.BlockComposer.end()


    {
      BlockComposer blockComposer = new BlockComposer(composer);
      blockComposer.begin(new Rectangle2D.Double(30,0,pageSize.getWidth()-60,50),AlignmentXEnum.Center,AlignmentYEnum.Middle);
      blockComposer.showText("Curves");
      blockComposer.end();
    }

    // 3.1. Arcs.
    {
      float y = 100;
View Full Code Here


    {
      BlockComposer blockComposer = new BlockComposer(composer);
      blockComposer.begin(new Rectangle2D.Double(30,0,pageSize.getWidth()-60,50),AlignmentXEnum.Center,AlignmentYEnum.Middle);
      blockComposer.showText("Miscellaneous");
      blockComposer.end();
    }

    composer.beginLocalState();
    composer.setLineJoin(LineJoinEnum.Round);
    composer.setLineCap(LineCapEnum.Round);
View Full Code Here

      );
    blockComposer.begin(frame,AlignmentXEnum.Center,AlignmentYEnum.Middle);
    blockComposer.showText(
      "Simple text alignment"
      );
    blockComposer.end();

    frame = new Rectangle2D.Double(
      30,
      pageSize.getHeight()-step/2,
      pageSize.getWidth()-60,
View Full Code Here

    composer.setFont(composer.getState().getFont(),10);
    blockComposer.showText(
      "NOTE: showText(...) methods return the actual bounding box of the text shown.\n"
        + "NOTE: The rotation parameter can be freely defined as a floating point value."
      );
    blockComposer.end();

    composer.setFont(composer.getState().getFont(),12);
    int x = 30;
    int y = step;
    int alignmentIndex = 0;
View Full Code Here

        AlignmentYEnum.Middle
        );
      blockComposer.showText(
        "Text block alignment"
        );
      blockComposer.end();
    }

    // Drawing the text blocks...
    int x = 30;
    int y = (int)(step*1.2);
 
View Full Code Here

            );
          blockComposer.begin(frame,alignmentX,alignmentY);
          blockComposer.showText(
            "Demonstrating how to constrain text inside a page area using PDF Clown. See the other available code samples (such as TypesettingSample) to discover more functionality details."
            );
          blockComposer.end();

          composer.beginLocalState();
          composer.setLineWidth(.2f);
          composer.setLineDash(5,5,5);
          composer.drawRectangle(frame);
View Full Code Here

        AlignmentYEnum.Middle
        );
      blockComposer.showText(
        "Text block line space"
        );
      blockComposer.end();
    }

    // Drawing the text blocks...
    int x = 30;
    int y = (int)(step*1.1);
 
View Full Code Here

        );
      blockComposer.begin(frame,AlignmentXEnum.Left,AlignmentYEnum.Top);
      blockComposer.showText(
        "Demonstrating how to set the block line space. Line space can be expressed either as an absolute value (in user-space units) or as a relative one (as a floating-point ratio); in the latter case the base value is represented by the current font's line height (so that, for example, 2 means \"a line space that's double the line height\")."
        );
      blockComposer.end();
     
      composer.beginLocalState();
      composer.setLineWidth(0.2f);
      composer.setLineDash(5,5,5);
      composer.drawRectangle(frame);
View Full Code Here

        composer.setFont(bodyFont,16);
        blockComposer.showText("Showing the EAN-13 Bar Code on different compositions:"); blockComposer.showBreak();
        blockComposer.showText("- page 1: on the lower right corner of the page, 100pt wide;"); blockComposer.showBreak();
        blockComposer.showText("- page 2: on the middle of the page, 1/3-page wide, 25 degree counterclockwise rotated;"); blockComposer.showBreak();
        blockComposer.showText("- page 3: filled page, 90 degree clockwise rotated."); blockComposer.showBreak();
        blockComposer.end();
      }

      // Show the barcode!
      composer.showXObject(
        barcodeXObject,
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.