How to merge 2 PAdES Envelopes in one pdf file?
Hi,
Can you tell us a bit more about your exact requirements?
Note that the digitally signed documents must remain unchanged; otherwise, their signatures become invalid.
Are you perhaps looking to create a PDF portfolio that would contain those two PAdES documents?
Regards,
Mario
Thanks for the reply.
In our application workflow we sign multiple pdfs then at some point the user wants to download them all and view all signed docs in a single file for better user experience. Till now we have been doing it by zipping all files and after extraction you open each one individually.
We were wondering if there was a way to append files and freeze signature fields .
Can you please provide sample code on how to use portfolio with v17 of gembox.pdf.
Hi Raed,
Try this:
using var document = new PdfDocument();
document.Pages.Add();
var portfolio = document.SetPortfolio();
portfolio.Files.Add("PAdES_1.pdf");
portfolio.Files.Add("PAdES_2.pdf");
// Set the first PDF file contained in the portfolio to be initially presented.
portfolio.InitialFile = document.EmbeddedFiles[0].Value;
// Hide all existing portfolio fields except the 'Name' field.
foreach (var portfolioFieldEntry in portfolio.Fields)
{
if (portfolioFieldEntry.Value.Name != "Name")
portfolioFieldEntry.Value.Hidden = true;
else
portfolioFieldEntry.Value.Hidden = false;
}
document.Save("Output.pdf");
Does this solve your issue?
Regards,
Mario