Esempio n. 1
0
 /// <summary>
 ///     File attachement constructor (no icon)
 /// </summary>
 /// <param name="EmbeddedFile">Embedded file</param>
 public AnnotFileAttachment
 (
     PdfEmbeddedFile EmbeddedFile
 ) : base("/FileAttachment")
 {
     this.EmbeddedFile = EmbeddedFile;
     Icon = FileAttachIcon.NoIcon;
 }
Esempio n. 2
0
 /// <summary>
 /// Add annotation file attachement with icon
 /// </summary>
 /// <param name="AnnotRect">Annotation rectangle</param>
 /// <param name="EmbeddedFile">Embedded file</param>
 /// <param name="Icon">Icon</param>
 /// <returns>PdfAnnotation</returns>
 /// <remarks>The AnnotRect is the icon rectangle area. To access the file
 /// the user has to right click on the icon.</remarks>
 public PdfAnnotation AddFileAttachment
 (
     PdfRectangle AnnotRect,
     PdfEmbeddedFile EmbeddedFile,
     FileAttachIcon Icon
 )
 {
     return(new PdfAnnotation(this, AnnotRect, new AnnotFileAttachment(EmbeddedFile, Icon)));
 }
Esempio n. 3
0
 /// <summary>
 ///     File attachement constructor
 /// </summary>
 /// <param name="EmbeddedFile">Embedded file</param>
 /// <param name="Icon">Icon enumeration</param>
 public AnnotFileAttachment
 (
     PdfEmbeddedFile EmbeddedFile,
     FileAttachIcon Icon
 ) : base("/FileAttachment")
 {
     this.EmbeddedFile = EmbeddedFile;
     this.Icon         = Icon;
 }
Esempio n. 4
0
        /// <summary>
        /// File attachement
        /// </summary>
        /// <param name="Page">Associated page</param>
        /// <param name="AnnotRect">Annotation rectangle</param>
        /// <param name="EmbeddedFile">Embedded file name</param>
        /// <param name="Icon">Icon</param>
        /// <remarks>
        /// <para>
        /// PDF specifications File Attachment Annotation page 637 table 8.35
        /// </para>
        /// </remarks>
        public PdfAnnotation
        (
            PdfPage Page,
            PdfRectangle AnnotRect,
            PdfEmbeddedFile EmbeddedFile,
            FileAttachIcon Icon = FileAttachIcon.PushPin
        ) : base(Page.Document)
        {
            // annotation subtype
            Dictionary.Add("/Subtype", "/FileAttachment");

            // add page reference
            Dictionary.AddIndirectReference("/FS", EmbeddedFile);

            // icon
            Dictionary.AddName("/Name", Icon.ToString());

            // constructor helper method
            ContructorHelper(Page, AnnotRect);

            // exit
            return;
        }
        /// <summary>
        /// File attachement
        /// </summary>
        /// <param name="Page">Associated page</param>
        /// <param name="AnnotRect">Annotation rectangle</param>
        /// <param name="EmbeddedFile">Embedded file name</param>
        /// <param name="Icon">Icon</param>
        /// <remarks>
        /// <para>
        /// PDF specifications File Attachment Annotation page 637 table 8.35
        /// </para>
        /// </remarks>
        public PdfAnnotation(
			PdfPage				Page,
			PdfRectangle		AnnotRect,
			PdfEmbeddedFile		EmbeddedFile,
			FileAttachIcon		Icon = FileAttachIcon.PushPin
			)
            : base(Page.Document)
        {
            // annotation subtype
            Dictionary.Add("/Subtype", "/FileAttachment");

            // add page reference
            Dictionary.AddIndirectReference("/FS", EmbeddedFile);

            // icon
            Dictionary.AddName("/Name", Icon.ToString());

            // constructor helper method
            ContructorHelper(Page, AnnotRect);

            // exit
            return;
        }