/// <summary>
        /// Creates a link to the web.
        /// </summary>
        public static PDFLinkAnnotation CreateWebLink(PDFRectangle rect, string url)
        {
            PDFLinkAnnotation link = new PDFLinkAnnotation
            {
                _linkType = LinkType.Web,
                Rectangle = rect,
                _url      = url
            };

            return(link);
        }
        /// <summary>
        /// Creates a link to a file.
        /// </summary>
        public static PDFLinkAnnotation CreateFileLink(PDFRectangle rect, string fileName)
        {
            PDFLinkAnnotation link = new PDFLinkAnnotation
            {
                _linkType = LinkType.File,
                // TODO: Adjust bleed box here (if possible)
                Rectangle = rect,
                _url      = fileName
            };

            return(link);
        }
        /// <summary>
        /// Creates a link within the current document.
        /// </summary>
        /// <param name="rect">The link area in default page coordinates.</param>
        /// <param name="destinationPage">The one-based destination page number.</param>
        public static PDFLinkAnnotation CreateDocumentLink(PDFRectangle rect, int destinationPage)
        {
            if (destinationPage < 1)
            {
                throw new ArgumentException("Invalid destination page in call to CreateDocumentLink: page number is one-based and must be 1 or higher.", "destinationPage");
            }

            PDFLinkAnnotation link = new PDFLinkAnnotation
            {
                _linkType = LinkType.Document,
                Rectangle = rect,
                _destPage = destinationPage
            };

            return(link);
        }