Hi,
We are using concatenate() method to merge the pdf's. After merging the pdf when rendering the PDF in browser, focus goes to the middle of a pdf document instead of first page.
Code used to merge the PDF's:
public static MemoryStream GetMergedFile(FileStream[] files)
{
MemoryStream ms = new MemoryStream();
MemoryStream msOut = new MemoryStream();
SetLicense();
try
{
PdfFileEditor editor = new PdfFileEditor();
editor.Concatenate(files, ms);
PdfFileSecurity pfs = new PdfFileSecurity(ms, msOut);
DocumentPrivilege dp = DocumentPrivilege.ForbidAll;
dp.AllowFillIn = true;
dp.AllowPrint = true;
dp.AllowAssembly = true;
dp.AllowCopy = true;
pfs.EncryptFile("", Constants.OWNER_PASSWORD, dp, true);
if (ms != null)
ms.Close();
}
catch (Exception ex)
{
foreach (FileStream fs in files)
fs.Close();
log.Error(ex);
throw;
}
foreach (FileStream fs in files)
fs.Close();
if (msOut != null)
msOut.Seek(0, SeekOrigin.Begin);
return msOut;
}
Please check this ASAP.
Regards,