Package org.pdfclown.documents.interaction.annotations

Examples of org.pdfclown.documents.interaction.annotations.FileAttachment


        as you can see in the following link creation (see below).
      */
      int fileAttachmentPageIndex = page.getIndex();
      String fileAttachmentName = "attachedSamplePDF";
      String fileName = new java.io.File(filePath).getName();
      FileAttachment attachment = new FileAttachment(
        page,
        new Rectangle(0, -20, 10, 10),
        new FileSpec(
          EmbeddedFile.get(
            document,
            filePath
            ),
          fileName
          )
        );
      attachment.setName(fileAttachmentName);
      attachment.setText("File attachment annotation");
      attachment.setIconType(FileAttachment.IconTypeEnum.PaperClip);

      blockComposer.begin(new Rectangle2D.Double(30,170,200,50),AlignmentXEnum.Left,AlignmentYEnum.Middle);
      composer.setFont(font,12);
      blockComposer.showText("Embedded-goto link");
      composer.setFont(font,8);
View Full Code Here


        )
      );

    // File attachment.
    composer.showText("File attachment annotation:", new Point(35,135));
    FileAttachment attachment = new FileAttachment(
      page,
      new Rectangle(50, 150, 12, 12),
      new FileSpec(
        EmbeddedFile.get(
          document,
          getInputPath() + java.io.File.separator + "images" + java.io.File.separator + "gnu.jpg"
          ),
        "happyGNU.jpg"
        )
      );
    attachment.setText("File attachment annotation");
    attachment.setIconType(FileAttachment.IconTypeEnum.PaperClip);

    composer.beginLocalState();
   
    // Arrow line.
    composer.showText("Line annotation:", new Point(35,185));
View Full Code Here

TOP

Related Classes of org.pdfclown.documents.interaction.annotations.FileAttachment

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.