I have been merging annotations from one document to copies of that document by going through the process of writing them from sharepoint, to the file system, and back to sharepoint. I just tried changing the code to bypass the file system and write/read/write directly to streams. I am getting the following error on the import:
Aspose.Pdf.Kit
Expected > for tag: < near line 4, column 4.
Here is the code:
Stream mergeSource = new MemoryStream(userBin);
Stream[] annotStream = new MemoryStream[1];
annotStream[0] = mergeSource;
Stream inputPdf = new MemoryStream(masterBin);
PdfAnnotationEditor pdfAnnEditor = new PdfAnnotationEditor();
pdfAnnEditor.BindPdf(inputPdf);
Enum[] annotType ={ AnnotationType.Polygon, AnnotationType.Caret, AnnotationType.Circle, AnnotationType.FreeText, AnnotationType.FileAttachment, AnnotationType.HightLight, AnnotationType.Ink, AnnotationType.Line, AnnotationType.Link, AnnotationType.Movie, AnnotationType.PolyLine, AnnotationType.Popup, AnnotationType.PrinterMark, AnnotationType.Screen, AnnotationType.Sound, AnnotationType.Square, AnnotationType.Squiggly, AnnotationType.Stamp, AnnotationType.StrikeOut, AnnotationType.Text, AnnotationType.TrapNet, AnnotationType.UnderLine, AnnotationType.Watermark, AnnotationType.Widget };
pdfAnnEditor.ImportAnnotationFromXfdf(inputPdf,annotType);