Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix InsertRange annotation crash #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Risord
Copy link

@Risord Risord commented May 20, 2019

PdfSharp.Pdf.InsertRange crash if there is fixed annotations.

Crash happen at the end of PdfSharp.Pdf.InsertRange:
page.Elements.Add(PdfPage.Keys.Annots, annotations);
since page have already annotations added by ImportExternalPage method. Therefore this seems like potential regression bug.

So use replace instead? Works nicely for me but I have no enough knowledge about PDF format to say should annotations be merged mode intelligently instead?

Adding annotations to page will crash since ImportExternalPage has already cloned them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant