/// <summary>
/// Adds long term validation (LTV) information to all signatures of specified PDF document.
/// </summary>
/// <param name="inputPdfFilename">The filename of input PDF document.</param>
/// <param name="outputPdfFilename">The filename of output PDF document.</param>
public static bool AddVltInfo(string inputPdfFilename, string outputPdfFilename)
{
// open PDF document
using (Vintasoft.Imaging.Pdf.PdfDocument document =
new Vintasoft.Imaging.Pdf.PdfDocument(inputPdfFilename))
{
try
{
// add LTV info
int count = Vintasoft.Imaging.Pdf.Tree.DigitalSignatures.PdfDocumentLtv.AddLtvInfo(document);
if (count == 0)
System.Console.WriteLine("LTV information is not required for this document.");
else
System.Console.WriteLine("LTV information is added.");
}
catch (System.Exception ex)
{
System.Console.WriteLine("Error: " + ex.Message);
return false;
}
// save PDF document
if (inputPdfFilename == outputPdfFilename)
document.SaveChanges();
else
document.Save(outputPdfFilename);
return true;
}
}
Forum 'Code samples'
Code samples for VintaSoft PDF .NET Plug-in. Here you can request a code sample.
Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions < Code samples
