Hello I am using the latest pre release version of PDFSharp and I am concatenating several documents. However, when I add the pages it is losing the annotation. Any idea why?
When I get the file like below, it has the annotation.
PdfDocument inputDocument1 = PdfReader.Open(fromDirectory, PdfDocumentOpenMode.Import);
But, when I go to add it to the overall document, like below, it loses the annotation.
page = outputDocument.AddPage(page);
Any help on this would be greatly appreciated!
事实证明,PDFSharp 1.50.4000-beta 3b有一个错误,因此我备份到1.32.3057版,然后开始工作。
To solve this issue, update this code:
page = outputDocument.AddPage(page);
To:
page = outputDocument.AddPage(page, AnnotationCopyingType.DeepCopy);
This fixed the issue for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.