Merged PDF sets the focus in the middle when rendering the PDF in browser

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,

Hi Prakash,

I have tested this issue at my end using your sample code and the PDF files, but I couldn’t notice any such problem. Could you please share a small fully working sample which can help us reproduce the same issue over here? We’ll test the issue at our end and update you accordingly.

We’re sorry for the inconvenience.
Regards,