Remove Open Action in C++
Contents
[
Hide
]
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.
- Create PdfContentEditor.
- Bind the PDF input with Facade::BindPdf().
- Remove the open action with PdfContentEditor::RemoveDocumentOpenAction().
- 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