Page 1 of 1
Annotation Conversion
Posted: Sat Mar 03, 2018 12:26 am
by kwaltman
If there a method to convert AnnotationData Objects to PDFAnnotation Objects? Or is there a way to save AnnotationData directly to a PDFPage object?
Re: Annotation Conversion
Posted: Sat Mar 03, 2018 8:09 am
by Alex
Hello Kevin,
VintaSoft Imaging .NET SDK allows to save annotations in PDF document as VintasoftAnnotations and/or as PDF annotations.
You need to use the ImageCollection, AnnotationDataCollection and AnnotationData classes if you want to save Vintasoft annotations into PDF document.
PDF encoder will create the appearances for Vintasoft annotations if you will set value of PdfEncoderSettings.GenerateAnnotationAppearance property to True:
https://www.vintasoft.com/docs/vsimagin ... rance.html
Created annotations can be
viewed and
edited in Vintasoft annotation viewer.
Created PDF annotation appearances can be
viewed in any PDF viewer. You also can edit created PDF annotation appearances in any PDF viewer
but your changes in PDF annotation appearances will be ignored (SDK will generate new appearances from Vintasoft annotations) if you later open PDF document in Vintasoft annotation viewer.
You need use the PdfDocument and PdfAnnotation classes if you want to save PDF annotations into PDF document. Created annotations can be
viewed and
edited in any PDF viewer.
Best regards, Alexander
Re: Annotation Conversion
Posted: Tue Mar 06, 2018 7:11 pm
by kwaltman
Thank you for the feedback. Is there a simple example of adding a PDFAnnotation to a VintaSoft PDFDocument Object that I can reference?
I've tried something like this, but there must be more to it:
Using Pdf As New Vintasoft.Imaging.Pdf.PdfDocument("c:\output\test.pdf")
Dim sq As New Vintasoft.Imaging.Pdf.Tree.Annotations.PdfSquareAnnotation(Pdf.Pages(0))
sq.Name = "Temp123"
sq.Rectangle = New RectangleF(10, 10, 100, 100)
sq.IsVintaSoftAnnotationAppearance = True
sq.Color = Color.Red
sq.BorderWidth = 4
sq.UpdateAppearance()
Pdf.SaveChanges()
End Using
This is a case where I need to add a PDF annotation to a PDFDocument object. No editor is being used as this is being built programmatically.
Re: Annotation Conversion
Posted: Wed Mar 07, 2018 8:18 am
by Alex
Please read this article:
https://www.vintasoft.com/docs/vsimagin ... ument.html
and let me know if you will have any question or problem.
Best regards, Alexander