Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the Bytescout.PDF.MovieAction.
 /// </summary>
 /// <param name="annotation">A movie annotation identifying the movie to be played.</param>
 /// <param name="operation">The operation to be performed on the movie.</param>
 public MovieAction(MovieAnnotation annotation, MovieOperation operation)
     : base(null)
 {
     if (annotation == null)
     {
         throw new ArgumentNullException("annotation");
     }
     _dictionary = new PDFDictionary();
     _dictionary.AddItem("Type", new PDFName("Action"));
     _dictionary.AddItem("S", new PDFName("Movie"));
     _dictionary.AddItem("Annotation", annotation.Dictionary);
     Operation = operation;
 }
Ejemplo n.º 2
0
        public static PDFName PDFMoveOperationToPDFName(MovieOperation operation)
        {
            switch (operation)
            {
            case MovieOperation.Pause:
                return(new PDFName("Pause"));

            case MovieOperation.Resume:
                return(new PDFName("Resume"));

            case MovieOperation.Stop:
                return(new PDFName("Stop"));
            }

            return(new PDFName("Play"));
        }