Add Movie Annotation in C++
Contents
[
Hide
]
Use PdfContentEditor for this task. The examples below retain the original C++ code and API Reference steps.
Add movie annotation
Create a movie annotation on page 1 using movieFile and the supplied display rectangle.
- Create PdfContentEditor.
- Bind the PDF input with Facade::BindPdf().
- Create the movie annotation with PdfContentEditor::CreateMovie().
- Save the resulting PDF with PdfContentEditor::
Save().
#include <Aspose.PDF.Cpp/Facades/PdfContentEditor.h>
#include <drawing/rectangle.h>
#include <system/string.h>
namespace Facades::Examples::PDF_ContentEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
using Rectangle = System::Drawing::Rectangle;
void AddMovieAnnotation(String inputFile, String movieFile, String outputFile)
{
auto editor = MakeObject<PdfContentEditor>();
editor->BindPdf(inputFile);
editor->CreateMovie(Rectangle(80, 500, 220, 120), movieFile, 1);
editor->Save(outputFile);
}
} // namespace Facades::Examples::PDF_ContentEditor