today i downloaded the curretn .NET Version 8.5 from your website and i used this sample code
to load a PDF, add a simple text annotation by code and save the annotation into the PDF.
Form-Load Event:
Code: Select all
oGdPicturePDF.LoadFromFile("c:\anleitung.pdf", False)
Dim oAnnotationManager As AnnotationManager = New AnnotationManager
If oAnnotationManager.InitFromGdPicturePDF(oGdPicturePDF) = GdPictureStatus.OK Then
oAnnotationManager.SelectPage(1)
Dim annot As AnnotationText = oAnnotationManager.AddTextAnnot(1, 1, 2, 2, "TESTTESTTEST")
annot.CanSelect = True
annot.Author = "John"
annot.StrokeColor = Color.Blue
annot.BorderWidth = 1
annot.Fill = True
' oAnnotationManager.BurnAnnotationsToPage(True) 'Comment this line to keep annots as XMP format
oAnnotationManager.SaveAnnotationsToPage()
oAnnotationManager.SaveDocumentToPDF("c:\testout.pdf")
End If
oAnnotationManager.Close()
GdViewer1.DisplayFromGdPicturePDF(oGdPicturePDF)
When i open the PDF with Acrobat the annotation is not visible.
If i use oAnnotationManager.BurnAnnotationsToPage(True) then GDviewer shows only a white
empty page for PDF page 1.
Is there a bug or did i something wrong ?
P.s.: I'm using VS 2008 and .NET Framework 2.0
Thanks
Joe