Remove Open Action in C++

Use PdfContentEditor for this task. The examples below retain the original C++ code and API Reference steps.

Remove open action

Remove the document-open action.

  1. Create PdfContentEditor.
  2. Bind the PDF input with Facade::BindPdf().
  3. Remove the open action with PdfContentEditor::RemoveDocumentOpenAction().
  4. Save the resulting PDF with PdfContentEditor::Save().
#include <Aspose.PDF.Cpp/Facades/PdfContentEditor.h>
#include <system/string.h>

namespace Facades::Examples::PDF_ContentEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;

void RemoveOpenAction(String inputFile, String outputFile)
{
    auto editor = MakeObject<PdfContentEditor>();

    editor->BindPdf(inputFile);
    editor->RemoveDocumentOpenAction();
    editor->Save(outputFile);
}
} // namespace Facades::Examples::PDF_ContentEditor