Package org.pdfclown.documents.contents.composition

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


        );
      composer.setFont(bodyFont,32);
      blockComposer.showText("Transformation sample"); blockComposer.showBreak();
      composer.setFont(bodyFont,16);
      blockComposer.showText("Showing the GNU logo placed on the page center, rotated by 25 degrees clockwise.");
      blockComposer.end();
    }
    // Showing the 'GNU' image...
    {
      // Instantiate a jpeg image object!
      Image image = Image.get(
View Full Code Here


        );
      composer.setFont(bodyFont,32);
      blockComposer.showText("Inline image sample"); blockComposer.showBreak();
      composer.setFont(bodyFont,16);
      blockComposer.showText("Showing the GNU logo as an inline image within the page content stream.");
      blockComposer.end();
    }
    // Showing the 'GNU' image...
    {
      // Instantiate the image!
      Image image = Image.get(getInputPath() + java.io.File.separator + "images" + java.io.File.separator + "gnu.jpg");
View Full Code Here

      composer.setFont(font,8);
      blockComposer.showText("[Source: " + sources[index] + "]");
      blockComposer.showBreak(breakSize,AlignmentXEnum.Justify);
    }
    // End the content block!
    blockComposer.end();

    // 4. Flush the contents into the page!
    composer.flush();
  }
}
View Full Code Here

      {
        BlockComposer blockComposer = new BlockComposer(composer);
        blockComposer.begin(new Rectangle2D.Double(296,50,page.getSize().getWidth()-336,36),AlignmentXEnum.Left,AlignmentYEnum.Middle);
        composer.setFont(composer.getState().getFont(),7);
        blockComposer.showText("If you click this push button, a javascript action should prompt you an alert box responding to the activation event triggered by your PDF viewer.");
        blockComposer.end();
      }
    }

    // 4.b. Check box.
    {
View Full Code Here

      {
        BlockComposer blockComposer = new BlockComposer(composer);
        blockComposer.begin(new Rectangle2D.Double(360,200,page.getSize().getWidth()-400,36),AlignmentXEnum.Left,AlignmentYEnum.Middle);
        composer.setFont(composer.getState().getFont(),7);
        blockComposer.showText("If you leave this text field after changing its content, a javascript action should prompt you an alert box responding to the validation event triggered by your PDF viewer.");
        blockComposer.end();
      }
    }

    // 4.e. Choice fields.
    {
View Full Code Here

        );
      blockComposer.showText(" " + steps[i]);
      blockComposer.showBreak(breakSize);
    }
    blockComposer.showText("Note that the approximation (" + maxCtmInversionApproximation + ") of the CTM components at step 4 is due to floating point precision limits; their exact values should be 1.0, 0.0, 0.0, 1.0, 0.0, 0.0.");
    blockComposer.end();
    composer.end();
  }

  private void buildSteps(
    PrimitiveComposer composer,
View Full Code Here

      breakSize.setSize(8,8);
      blockComposer.showBreak(breakSize);
      blockComposer.showText("1. anchored to the center of the page, rotated by 45 degrees counterclockwise, 300 point wide (preserved proportions);"); blockComposer.showBreak(breakSize);
      blockComposer.showText("2. anchored to the bottom-left corner of the page, 300 point high (preserved proportions);"); blockComposer.showBreak(breakSize);
      blockComposer.showText("3. anchored to the bottom-right corner of the page, 80 point wide and 200 point high (altered proportions).");
      blockComposer.end();
    }

    // 4. Flush the contents into the content stream!
    composer.flush();
  }
View Full Code Here

      blockComposer.showText("Goto-URI link");
      composer.setFont(font,8);
      blockComposer.showText("\nIt allows you to navigate to a network resource.");
      composer.setFont(font,5);
      blockComposer.showText("\n\nClick on the box to go to the project's SourceForge.net repository.");
      blockComposer.end();

      try
      {
        /*
          NOTE: This statement instructs the PDF viewer to navigate to the given URI when the link is clicked.
View Full Code Here

      blockComposer.showText("Embedded-goto link");
      composer.setFont(font,8);
      blockComposer.showText("\nIt allows you to navigate to a destination within an embedded PDF file.");
      composer.setFont(font,5);
      blockComposer.showText("\n\nClick on the button to go to the 2nd page of the attached PDF file (" + fileName + ").");
      blockComposer.end();

      /*
        NOTE: This statement instructs the PDF viewer to navigate to the page 2 of a PDF file
        attached inside the current document as described by the FileAttachment annotation on page 1 of the current document.
      */
 
View Full Code Here

      blockComposer.showText("Textual link");
      composer.setFont(font,8);
      blockComposer.showText("\nIt allows you to expose any kind of link (including the above-mentioned types) as text.");
      composer.setFont(font,5);
      blockComposer.showText("\n\nClick on the text links to go either to the project's SourceForge.net repository or to the project's home page.");
      blockComposer.end();

      try
      {
        composer.beginLocalState();
        composer.setFont(font,10);
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.