"An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem"
Sometimes I got this errors displayed when displaying a merged pdf documents. Error was only displayed in IE, if I use Chrome with its own pdf plug-in, there was no error for the same merged Pdf and all pages are rendering correctly!!!
Any advises or suggestion would be greatly appreciated.
Thanks,
Here is my C# code for merging a collection of pdf documents in Memory Streams:
public MemoryStream MergedPdfs(ObservableCollection<PdfDocument> pPrintPdfs)
{
MemoryStream mergedStream = new MemoryStream();
PdfDocument tobePrintedPdf = new PdfDocument();
if(pPrintPdfs != null && pPrintPdfs.Count > 0)
{
foreach (PdfDocument doc in pPrintPdfs)
{
tobePrintedPdf.AppendPage(doc);
}
tobePrintedPdf.SaveToStream(mergedStream);
}
return mergedStream;
}