How To Create Movie Annotation in PDF Mosaic Library .NET

This sample shows how to add movie annotations to your PDF document.

C# :

using PDFMosaic;
using System;
using System.IO;

namespace MovieAnnotation
  class MovieAnnotation
    static void Main()
      PDFDocument document = new PDFDocument();
      PDFPage page = new PDFPage(PDFPaperFormat.A4);

      PDFMovie movie = new PDFMovie(Path.GetFullPath("..\\..\\test.avi"));
      PDFMovieAnnotation movieAnnotation = new PDFMovieAnnotation(movie, 40, 40, 100, 100);
      movieAnnotation.MovieActivation.ShowControls = true;

      document.Save("MovieAnnotation.pdf", true);


Imports PDFMosaic
Imports System
Imports System.IO

Module MovieAnnotation
  Sub Main()
    Dim document As New PDFDocument()
    Dim page As New PDFPage(PDFPaperFormat.A4)

    Dim movie As New PDFMovie(Path.GetFullPath("..\\..\\test.avi"))
    Dim movieAnnotation As New PDFMovieAnnotation(movie, 40, 40, 100, 100)
    movieAnnotation.MovieActivation.ShowControls = True

    document.Save("MovieAnnotation.pdf", True)
  End Sub
End Module