Signature Management in C++
Contents
[
Hide
]
Use PdfFileSignature for this task. The examples below retain the original C++ code and API Reference steps.
Remove signature
Remove the first signature and save the modified PDF.
- Create PdfFileSignature.
- Bind the PDF input with Facade::BindPdf().
- Read signature identifiers with PdfFileSignature::GetSignatureNames().
- Remove the selected signature with PdfFileSignature::RemoveSignature().
- Save the resulting PDF with PdfFileSignature::
Save().
#include <Aspose.PDF.Cpp/Facades/PdfFileSignature.h>
#include <Aspose.PDF.Cpp/Facades/SignatureName.h>
#include <system/collections/ilist.h>
#include <system/string.h>
namespace Facades::Examples::PDF_FileSignature
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
void RemoveSignature(String inputFile, String outputFile)
{
auto pdfSignature = MakeObject<PdfFileSignature>();
pdfSignature->BindPdf(inputFile);
auto signatureName = pdfSignature->GetSignatureNames()->idx_get(0);
pdfSignature->RemoveSignature(signatureName);
pdfSignature->Save(outputFile);
}
} // namespace Facades::Examples::PDF_FileSignature