Posted by a ceTe Software moderator
Hello,
In v7 it is not possible to bypass the encrypted PDF. In order to merge encrypted PDFs with v7 you would need an Enterprise Edition license.
In v8 we have included a SecurityInfo enumerator in PdfDocument class to check whether the PDF being merged is encrypted or not. You can avoid merging encrypted PDF using this feature. Refer to the documentation on SecurityInfo enumerator
here. Here is the sample code on how to bypass the encrypted PDF using v8.
MergeDocument document = new MergeDocument();
PdfDocument pdf = new PdfDocument(@"Path of an input PDF");
SecurityInfo secInfo = pdf.SecurityInfo;
string str = secInfo.ToString();
if (str.Equals("None")) //append PDF if it is not encrypted.
{
document.Append(pdf);
}
document.Draw(@"Path to save the PDF");
Thanks,
ceTe Software Support Team.