Пример #1
0
 /// <summary>
 /// Initializes a new instance of the Bytescout.PDF.Movie class.
 /// </summary>
 /// <param name="filePath" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">The path to the movie.</param>
 public Movie(string filePath)
 {
     if (filePath == null)
     {
         filePath = "";
     }
     _fileSpecification = new SimpleFileSpecification(filePath);
     _dictionary        = new PDFDictionary();
     _dictionary.AddItem("F", _fileSpecification.GetDictionary());
     _dictionary.AddItem("Poster", new PDFBoolean(true));
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the Bytescout.PDF.GoToRemoteAction.
        /// </summary>
        /// <param name="fileName" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">Path to the destination document.</param>
        /// <param name="pageIndex" href="http://msdn.microsoft.com/en-us/library/system.int32.aspx">The index of the page to jump to.</param>
        /// <param name="newWindow" href="http://msdn.microsoft.com/en-us/library/system.boolean.aspx">A value specifying whether to open the destination document in a new window.</param>
        public GoToRemoteAction(string fileName, int pageIndex, bool newWindow)
            : base(null)
        {
            _dictionary = new PDFDictionary();
            _dictionary.AddItem("Type", new PDFName("Action"));
            _dictionary.AddItem("S", new PDFName("GoToR"));
            NewWindow = newWindow;

            _fileSpecification = new SimpleFileSpecification(fileName);
            _dictionary.AddItem("F", _fileSpecification.GetDictionary());
            PageIndex = pageIndex;
        }
        /// <summary>
        /// Initializes a new instance of the Bytescout.PDF.ImportDataAction.
        /// </summary>
        /// <param name="fileName" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">The FDF file from which to import the data.</param>
        public ImportDataAction(string fileName)
            : base(null)
        {
            _dictionary = new PDFDictionary();
            _dictionary.AddItem("Type", new PDFName("Action"));
            _dictionary.AddItem("S", new PDFName("ImportData"));

            if (fileName == null)
            {
                fileName = "";
            }
            _fileSpecification = new SimpleFileSpecification(fileName);
            _dictionary.AddItem("F", _fileSpecification.GetDictionary());
        }
        /// <summary>
        /// Initializes a new instance of the Bytescout.PDF.SubmitFormAction.
        /// </summary>
        /// <param name="uri" href="http://msdn.microsoft.com/en-us/library/system.uri.aspx">The uniform resource identifier.</param>
        public SubmitFormAction(Uri uri)
            : base(null)
        {
            if (uri == null)
            {
                throw new ArgumentNullException();
            }

            _dictionary = new PDFDictionary();
            _dictionary.AddItem("Type", new PDFName("Action"));
            _dictionary.AddItem("S", new PDFName("SubmitForm"));

            _fileSpec = new URLFileSpecification(uri);
            _dictionary.AddItem("F", _fileSpec.GetDictionary());
        }
Пример #5
0
        /// <summary>
        /// Initializes a new instance of the Bytescout.PDF.LaunchAction.
        /// </summary>
        /// <param name="fileName" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">Path to the application to be launched or the document to be opened.</param>
        public LaunchAction(string fileName)
            : base(null)
        {
            if (fileName == null)
            {
                fileName = "";
            }

            _dictionary = new PDFDictionary();
            _dictionary.AddItem("Type", new PDFName("Action"));
            _dictionary.AddItem("S", new PDFName("GoToR"));

            _fileSpecification = new SimpleFileSpecification(fileName);
            _dictionary.AddItem("F", _fileSpecification.GetDictionary());
        }
Пример #6
0
 private void init(FileSpecification fs)
 {
     Dictionary.AddItem("Subtype", new PDFName("FileAttachment"));
     _fileSpec = fs;
     Dictionary.AddItem("FS", _fileSpec.GetDictionary());
 }