Annotation Conversion

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
kwaltman
Posts: 28
Joined: Fri Aug 07, 2009 9:48 pm

Annotation Conversion

Post by kwaltman » Sat Mar 03, 2018 12:26 am

If there a method to convert AnnotationData Objects to PDFAnnotation Objects? Or is there a way to save AnnotationData directly to a PDFPage object?

Alex
Site Admin
Posts: 1590
Joined: Thu Jul 10, 2008 2:21 pm

Re: Annotation Conversion

Post by Alex » Sat Mar 03, 2018 8:09 am

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

kwaltman
Posts: 28
Joined: Fri Aug 07, 2009 9:48 pm

Re: Annotation Conversion

Post by kwaltman » Tue Mar 06, 2018 7:11 pm

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.

Alex
Site Admin
Posts: 1590
Joined: Thu Jul 10, 2008 2:21 pm

Re: Annotation Conversion

Post by Alex » Wed Mar 07, 2018 8:18 am

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

Post Reply