Examples of PdfFileSpecification


Examples of com.lowagie.text.pdf.PdfFileSpecification

               return new PdfAnnotation(writer, annot.llx(), annot.lly(), annot.urx(), annot.ury(), new PdfAction((String) annot.attributes().get(Annotation.FILE), (String) annot.attributes().get(Annotation.DESTINATION)));
           case Annotation.SCREEN:
               boolean sparams[] = (boolean[])annot.attributes().get(Annotation.PARAMETERS);
               String fname = (String) annot.attributes().get(Annotation.FILE);
               String mimetype = (String) annot.attributes().get(Annotation.MIMETYPE);
               PdfFileSpecification fs;
               if (sparams[0])
                   fs = PdfFileSpecification.fileEmbedded(writer, fname, fname, null);
               else
                   fs = PdfFileSpecification.fileExtern(writer, fname);
               PdfAnnotation ann = PdfAnnotation.createScreen(writer, new Rectangle(annot.llx(), annot.lly(), annot.urx(), annot.ury()),
View Full Code Here

Examples of com.lowagie.text.pdf.PdfFileSpecification

      writer.setPdfVersion(PdfWriter.VERSION_1_5);
      document.open();
      // step 4:
      PdfContentByte cb = writer.getDirectContent();
      // page 1
            PdfFileSpecification fs = PdfFileSpecification.fileExtern(writer, "cards.mpg");
            writer.addAnnotation(PdfAnnotation.createScreen(writer, new Rectangle(200f, 700f, 300f, 800f), "cards.mpg",fs,"video/mpeg",true));
      PdfAnnotation a = new PdfAnnotation(writer, 200f, 550f, 300f, 650f,
          PdfAction.javaScript("app.alert('Hello');\r", writer));
      document.add(new Chunk("click to trigger javascript").setAnnotation(a).setLocalDestination("top"));
      writer.addAnnotation(a);
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.