using (var ms = new MemoryStream())
{
using (PDFDoc doc = new PDFDoc(infile))
{
// [...sign the document...]
doc.Save(ms, 0);
}
ms.Position = 0;
using (var doc = new PDFDoc(ms))
{
// [...sign the document with a second signature...]
doc.Save(ms, SDFDoc.SaveOptions.e_incremental);
// [...save ms to file...]
}
}
using (var ms = new MemoryStream())
{
using (PDFDoc doc = new PDFDoc(infile))
{
// [...sign the document...]
doc.Save(ms, 0);
}
ms.Position = 0;
using (var doc = new PDFDoc(ms))
{
// [...sign the document with a second signature...]
using (var ms1 = new MemoryStream())
{
doc.Save(ms1, SDFDoc.SaveOptions.e_incremental);
// [...save ms1 to file...]
}
}
}