PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Import Annotated Comments from Pdf https://forum.pdfsharp.net/viewtopic.php?f=2&t=1714 |
Page 1 of 1 |
Author: | SASEKUMAR1984 [ Wed Jul 06, 2011 2:00 pm ] |
Post subject: | Import Annotated Comments from Pdf |
Hi All, I have two pdfs where comments/annotations are added by different users and need to imports documents 2 comments in documents1. This shows "Document Cannot Change" exception due to owner change. Here is the sample code i tried. PdfDocument authorPdf = PdfReader.Open(authorFile, PdfDocumentOpenMode.Modify); PdfDocument editorPdf = PdfReader.Open(editorFile, PdfDocumentOpenMode.Modify); foreach (DictionaryEntry entry in pdfTable) { PdfPage authorPdfPage = authorPdf.Pages[(int)entry.Key -1]; PdfPage editorPdfPage = editorPdf.Pages[(int)entry.Value-1]; foreach (PdfAnnotation pdfAnnot in editorPdfPage.Annotations) { // Console.WriteLine(pdfAnnot.Owner); //PdfAnnotation newAnnot = new PdfAnnotation(); //newAnnot = pdfAnnot; authorPdfPage.Annotations.Add(pdfAnnot); } } authorPdf.Save(authorFile); Any solution/advice much appreciated. Thanks Selvakumar |
Author: | SASEKUMAR1984 [ Thu Jul 07, 2011 3:14 pm ] |
Post subject: | Re: Import Annotated Comments from Pdf |
Any advise or direction is helpful for me to decide further? |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |