Click here to Skip to main content
15,896,111 members
Articles / Programming Languages / Javascript

Javascript in PDF

Rate me:
Please Sign up or sign in to vote.
4.98/5 (35 votes)
7 May 2012CPOL6 min read 226.3K   5.8K   57  
This article describes how to use Javascript code to create interactive PDF documents.
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.235
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace JavascriptInPdf {
    using System;
    
    
    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
        }
        
        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("JavascriptInPdf.Resources", typeof(Resources).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }
        
        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vestibulum auctor mauris, ac euismod mi luctus ac. Aenean viverra lectus quis justo rutrum tempus. Sed congue adipiscing turpis, sollicitudin molestie felis ultricies eu. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet egestas mi. Ut fermentum, justo in rutrum convallis, purus neque facilisis velit, sed varius arcu neque ac lorem. Aliquam et nunc vehicula elit lacinia fringilla. Nam a malesuada nisl. Aliquam varius fermentu [rest of string was truncated]&quot;;.
        /// </summary>
        internal static string LoremIpsum {
            get {
                return ResourceManager.GetString("LoremIpsum", resourceCulture);
            }
        }
        
        internal static byte[] NamesPdf {
            get {
                object obj = ResourceManager.GetObject("NamesPdf", resourceCulture);
                return ((byte[])(obj));
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to function setDay(date) {
        ///  var dayField = this.getField(&quot;day&quot;);
        ///  dayField.value = util.printd(&quot;dd&quot;, date);
        ///}
        ///
        ///function setMonth(date) {
        ///  var monthField = this.getField(&quot;month&quot;);
        ///  monthField.value = util.printd(&quot;date(ru){MMMM}&quot;, date, true);
        ///}
        ///
        ///function setYear(date) {
        ///  var yearField = this.getField(&quot;year&quot;);
        ///  yearField.value = util.printd(&quot;yyyy&quot;, date);
        ///}
        ///
        ///function setCurrentDate() {
        ///  var now = new Date();
        ///  setDay(now);
        ///  setMonth(now);
        ///  setYear(now);
        ///}
        ///
        ///setCurrentDate();
        ///.
        /// </summary>
        internal static string SetCurrentDate {
            get {
                return ResourceManager.GetString("SetCurrentDate", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to function synchronizeFields(source, destination) {
        ///	destination.text = source.text;
        ///}.
        /// </summary>
        internal static string SynchronizeFields {
            get {
                return ResourceManager.GetString("SynchronizeFields", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to function validateNumeric(event) {
        ///	var validCharacters = &quot;0123456789&quot;;
        ///	for (var i = 0; i &lt; event.change.length; i++) {
        ///		if (validCharacters.indexOf(event.change.charAt(i)) == -1) {
        ///			app.beep(0);
        ///			event.rc = false;
        ///			break;
        ///		}
        ///	}
        ///}
        ///
        ///validateNumeric(event);.
        /// </summary>
        internal static string ValidateNumeric {
            get {
                return ResourceManager.GetString("ValidateNumeric", resourceCulture);
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Bit Miracle
Russian Federation Russian Federation
Vitaliy Shibaev is a developer and co-founder of Bit Miracle, company developing the Docotic.Pdf, Jpeg2000.Net, LibTiff.Net libraries.

Docotic.Pdf - pure .NET library for PDF processing. It is a high-quality library for text extraction, PDF to image conversion, compressing PDF, and other PDF tasks.

Jpeg2000.Net - the library for encoding/decoding JPEG 2000 images in .NET.

Comments and Discussions