示例#1
0
 /** Adds a file attachment at the document level. Existing attachments will be kept.
  * @param description the file description
  * @param fileStore an array with the file. If it's <CODE>null</CODE>
  * the file will be read from the disk
  * @param file the path to the file. It will only be used if
  * <CODE>fileStore</CODE> is not <CODE>null</CODE>
  * @param fileDisplay the actual file name stored in the pdf
  * @throws IOException on error
  */
 public void AddFileAttachment(String description, byte[] fileStore, String file, String fileDisplay)
 {
     AddFileAttachment(description, PdfFileSpecification.FileEmbedded(stamper, file, fileDisplay, fileStore));
 }
示例#2
0
 /** Creates a file attachment annotation.
  * @param writer the <CODE>PdfWriter</CODE>
  * @param rect the dimensions in the page of the annotation
  * @param contents the file description
  * @param fileStore an array with the file. If it's <CODE>null</CODE>
  * the file will be read from the disk
  * @param file the path to the file. It will only be used if
  * <CODE>fileStore</CODE> is not <CODE>null</CODE>
  * @param fileDisplay the actual file name stored in the pdf
  * @throws IOException on error
  * @return the annotation
  */
 public static PdfAnnotation CreateFileAttachment(PdfWriter writer, Rectangle rect, String contents, byte[] fileStore, String file, String fileDisplay)
 {
     return(CreateFileAttachment(writer, rect, contents, PdfFileSpecification.FileEmbedded(writer, file, fileDisplay, fileStore)));
 }