Пример #1
0
        ////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Add weblink to this page
        /// </summary>
        /// <param name="WeblinkArea">Weblink area</param>
        /// <param name="WebLinkStr">Hyperlink string</param>
        /// <remarks>
        /// <para>
        ///	The four position arguments are in relation to the
        ///	bottom left corner of the paper.
        ///	If web link is empty, ignore this call.
        /// </para>
        /// <para>
        /// For more information go to <a href="http://www.codeproject.com/Articles/570682/PDF-File-Writer-Csharp-Class-Library-Version#WeblinkSupport">2.7 Web Link Support</a>
        /// </para>
        /// </remarks>
        ////////////////////////////////////////////////////////////////////
        public void AddWebLink
        (
            PdfRectangle WeblinkArea,
            String WebLinkStr
        )
        {
            // if web link is empty, ignore this call
            if (String.IsNullOrWhiteSpace(WebLinkStr))
            {
                return;
            }

            // create weblink action or reuse duplicate
            PdfWebLink WebLinkAction = PdfWebLink.AddWebLink(Document, WebLinkStr);

            // create PdfObject for annotation
            PdfAnnotation Annotation = new PdfAnnotation(this, WeblinkArea, WebLinkAction);

            // exit
            return;
        }
Пример #2
0
        /// <summary>
        /// Add rendering screen action to page
        /// </summary>
        /// <param name="Rect">Annotation rectangle</param>
        /// <param name="FileName">Media file name</param>
        /// <param name="WidthPix">Video width in pixels</param>
        /// <param name="HeightPix">Video height in pixels</param>
        /// <param name="MimeType">Media file Mime type</param>
        public void AddScreenAction
        (
            PdfRectangle Rect,
            String FileName,
            Int32 WidthPix  = 0,
            Int32 HeightPix = 0,
            String MimeType = null
        )
        {
            // create embedded media file
            PdfEmbeddedFile MediaFile = new PdfEmbeddedFile(Document, FileName);

            // Section 8.5 page 669 table 8.64
            PdfDisplayMedia ScreenAction = new PdfDisplayMedia(MediaFile, MimeType);

            // create PdfObject for annotation
            PdfAnnotation Annotation = new PdfAnnotation(this, Rect, ScreenAction);

//		Annotation.DisplayBorder(0.1);

            // exit
            return;
        }
Пример #3
0
        ////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Add weblink to this page
        /// </summary>
        /// <param name="WeblinkArea">Weblink area</param>
        /// <param name="WebLinkStr">Hyperlink string</param>
        /// <remarks>
        /// <para>
        ///	The four position arguments are in relation to the
        ///	bottom left corner of the paper.
        ///	If web link is empty, ignore this call.
        /// </para>
        /// <para>
        /// For more information go to <a href="http://www.codeproject.com/Articles/570682/PDF-File-Writer-Csharp-Class-Library-Version#WeblinkSupport">2.7 Web Link Support</a>
        /// </para>
        /// </remarks>
        ////////////////////////////////////////////////////////////////////
        public void AddWebLink(
            PdfRectangle	WeblinkArea,
            String			WebLinkStr
            )
        {
            // if web link is empty, ignore this call
            if(String.IsNullOrWhiteSpace(WebLinkStr)) return;

            // create weblink action or reuse duplicate
            PdfWebLink WebLinkAction = PdfWebLink.AddWebLink(Document, WebLinkStr);

            // create PdfObject for annotation
            PdfAnnotation Annotation = new PdfAnnotation(this, WeblinkArea, WebLinkAction);

            // exit
            return;
        }
Пример #4
0
        /// <summary>
        /// Add rendering screen action to page
        /// </summary>
        /// <param name="Rect">Annotation rectangle</param>
        /// <param name="FileName">Media file name</param>
        /// <param name="WidthPix">Video width in pixels</param>
        /// <param name="HeightPix">Video height in pixels</param>
        /// <param name="MimeType">Media file Mime type</param>
        public void AddScreenAction(
            PdfRectangle	Rect,
            String			FileName,
            Int32			WidthPix = 0,
            Int32			HeightPix = 0,
            String			MimeType = null
            )
        {
            // create embedded media file
            PdfEmbeddedFile MediaFile = new PdfEmbeddedFile(Document, FileName);

            // Section 8.5 page 669 table 8.64
            PdfDisplayMedia ScreenAction = new PdfDisplayMedia(MediaFile, MimeType);

            // create PdfObject for annotation
            PdfAnnotation Annotation = new PdfAnnotation(this, Rect, ScreenAction);

            //		Annotation.DisplayBorder(0.1);

            // exit
            return;
        }