Package org.pdfclown.documents.contents.composition

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


      150,
      pageSize.getWidth() - 110,
      pageSize.getHeight() - 250
      );

    blockComposer.begin(frame,AlignmentXEnum.Left,AlignmentYEnum.Top);
    StandardType1Font titleFont = new StandardType1Font(
      document,
      StandardType1Font.FamilyEnum.Times,
      true,
      false
View Full Code Here


    }
    catch(Exception e)
    {/* NOOP. */}
    if(image == null)
    {
      blockComposer.begin(frame,AlignmentXEnum.Left,AlignmentYEnum.Top);
      composer.setFont(bodyFont,12);
      composer.setFillColor(new DeviceRGBColor(1,0,0));
      blockComposer.showText("The file you uploaded wasn't a valid JPEG image!");
      blockComposer.end();

View Full Code Here

      frame.y = blockComposer.getBoundBox().getMaxY() + 20;
      frame.height -= (blockComposer.getBoundBox().getHeight() + 20);
    }
    else
    {
      blockComposer.begin(frame,AlignmentXEnum.Left,AlignmentYEnum.Top);
      composer.setFont(bodyFont,12);
      blockComposer.showText("Here it is the image you uploaded: ");
      blockComposer.end();

      // Move past the closed block!
View Full Code Here

      frame.width = width;
    }

    if (comment != null)
    {
      blockComposer.begin(frame,AlignmentXEnum.Justify,AlignmentYEnum.Top);
      composer.setFont(
        new StandardType1Font(
          document,
          StandardType1Font.FamilyEnum.Courier,
          false,
View Full Code Here

    // 2. Create a content composer for the page!
    PrimitiveComposer composer = new PrimitiveComposer(page);

    BlockComposer blockComposer = new BlockComposer(composer);
    blockComposer.begin(new Rectangle2D.Double(300,400,200,100),AlignmentXEnum.Left,AlignmentYEnum.Middle);
    try
    {
      composer.setFont(
        new StandardType1Font(
          document,
View Full Code Here

      Margin_Y,
      pageSize.getWidth() - Margin_X * 2,
      pageSize.getHeight() - Margin_Y * 2
      );
    // Begin the title block!
    blockComposer.begin(frame,AlignmentXEnum.Left,AlignmentYEnum.Top);
    Font decorativeFont = Font.get(
      document,
      getInputPath() + java.io.File.separator + "fonts" + java.io.File.separator + "Ruritania-Outline.ttf"
      );
    composer.setFont(decorativeFont,56);
View Full Code Here

      blockComposer.getBoundBox().getY() + blockComposer.getBoundBox().getHeight(),
      blockComposer.getBoundBox().getWidth(),
      pageSize.getHeight() - Margin_Y - (blockComposer.getBoundBox().getY() + blockComposer.getBoundBox().getHeight())
      );
    // Begin the body block!
    blockComposer.begin(frame,AlignmentXEnum.Justify,AlignmentYEnum.Bottom);
    Font bodyFont = Font.get(
      document,
      getInputPath() + java.io.File.separator + "fonts" + java.io.File.separator + "TravelingTypewriter.otf"
      );
    composer.setFont(bodyFont,14);
View Full Code Here

        pageSize.getWidth() - 50,
        pageSize.getHeight() - 25
        )
      );
    blockComposer = new BlockComposer(composer);
    blockComposer.begin(
      new Rectangle2D.Double(0,0,300,50),
      AlignmentXEnum.Left,
      AlignmentYEnum.Middle
      );
    composer.setFont(bodyFont,8);
View Full Code Here

        composer.drawRectangle(frame);
        composer.fillStroke();
        composer.end();

        BlockComposer blockComposer = new BlockComposer(composer);
        blockComposer.begin(frame,AlignmentXEnum.Center,AlignmentYEnum.Middle);
        composer.setFillColor(getForeColor());
        composer.setFont(
          new StandardType1Font(
            document,
            StandardType1Font.FamilyEnum.ZapfDingbats,
View Full Code Here

        composer.drawEllipse(frame);
        composer.fillStroke();
        composer.end();

        BlockComposer blockComposer = new BlockComposer(composer);
        blockComposer.begin(frame,AlignmentXEnum.Center,AlignmentYEnum.Middle);
        composer.setFillColor(getForeColor());
        composer.setFont(
          new StandardType1Font(
            document,
            StandardType1Font.FamilyEnum.ZapfDingbats,
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.