Hey, not sure if this has been addressed, but annotations are missing from the bad pdf. It looks like the annotations are not being copied over. I have not looked into the reason why this may be.
Code:
PdfPage ImportExternalPage(PdfPage importPage)
{
if (importPage.Owner._openMode != PdfDocumentOpenMode.Import)
throw new InvalidOperationException("A PDF document must be opened with PdfDocumentOpenMode.Import to import pages from it.");
PdfPage page = new PdfPage(_document);
// ReSharper disable AccessToStaticMemberViaDerivedType for a better code readability.
CloneElement(page, importPage, PdfPage.Keys.Resources, false);
CloneElement(page, importPage, PdfPage.Keys.Contents, false);
CloneElement(page, importPage, PdfPage.Keys.MediaBox, true);
CloneElement(page, importPage, PdfPage.Keys.CropBox, true);
CloneElement(page, importPage, PdfPage.Keys.Rotate, true);
CloneElement(page, importPage, PdfPage.Keys.BleedBox, true);
CloneElement(page, importPage, PdfPage.Keys.TrimBox, true);
CloneElement(page, importPage, PdfPage.Keys.ArtBox, true);
#if true
// Do not deep copy annotations.
//CloneElement(page, importPage, PdfPage.Keys.Annots, false);
#else
// Deep copy annotations.
CloneElement(page, importPage, PdfPage.Keys.Annots, true);
#endif
// ReSharper restore AccessToStaticMemberViaDerivedType
// TODO more elements?
return page;
}