Add XMP Annotation by code to PDF/TIFF
Add XMP Annotation by code to PDF/TIFF
Hi,
Someone could help me and if possible I create / put entry in GdViewer class without having to use the method that has the
interactivity of the mouse? just add properties that I set up Direct.
Kind Regards
Someone could help me and if possible I create / put entry in GdViewer class without having to use the method that has the
interactivity of the mouse? just add properties that I set up Direct.
Kind Regards
Re: Add mouse interactivity without annotation
Hi Diego,
Please could you clarify what you exactly want to do ?
Kind regards,
Loïc
Please could you clarify what you exactly want to do ?
Kind regards,
Loïc
Re: Add mouse interactivity without annotation
I want to create annotation directly into pdf or tif file without using the method GdViewer1.AddStickyNoteAnnotationInteractive ('Double click to change text', GdViewer1.ARGBI (255,0,0,0), 'Arial', 0, 12, 0.9,10); because this method is to use the mouse to specify where you want the note
Re: Add mouse interactivity without annotation
Hello Diego,
You have to use the AnnotationManager class for such purpose.
Example on adding annot by code to PDF:
And here to image:
You have to use the AnnotationManager class for such purpose.
Example on adding annot by code to PDF:
Code: Select all
Dim oGdPicturePDF As New GdPicturePDF
If oGdPicturePDF.LoadFromFile("c:\test.pdf", False) = GdPictureStatus.OK Then
Dim oAnnotationManager As AnnotationManager = New AnnotationManager
If oAnnotationManager.InitFromGdPicturePDF(oGdPicturePDF) = GdPictureStatus.OK Then
Dim annot As AnnotationStickyNote = oAnnotationManager.AddStickyNoteAnnot(0, 0, 3, 3, "To Be Investigated")
annot.CanSelect = False
annot.Author = "John"
oAnnotationManager.BurnAnnotationsToPage(True) 'Comment this line to keep annots as XMP format
oAnnotationManager.SaveDocumentToPDF("c:\testout.pdf")
oAnnotationManager.Close()
End If
oGdPicturePDF.CloseDocument()
End If
Code: Select all
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("c:\001.tif")
If oGdPictureImaging.GetStat = GdPictureStatus.OK Then
Dim oAnnotationManager As AnnotationManager = New AnnotationManager
If oAnnotationManager.InitFromGdPictureImage(ImageID) = GdPictureStatus.OK Then
Dim annot As AnnotationStickyNote = oAnnotationManager.AddStickyNoteAnnot(0, 0, 3, 3, "To Be Investigated")
annot.CanSelect = False
annot.Author = "John"
oAnnotationManager.BurnAnnotationsToPage(True) 'Comment this line to keep annots as XMP format
oAnnotationManager.SaveDocumentToTIFF("c:\testout.tif", TiffCompression.TiffCompressionAUTO)
oAnnotationManager.Close()
End If
oGdPictureImaging.ReleaseGdPictureImage(ImageID)
End If
Re: Add XMP Annotation by code to PDF/TIFF
I am using the class GdViewer have a problem with last change above or has to be changed?
Re: Add XMP Annotation by code to PDF/TIFF
Hey Diego, I don't understand the question.
Re: Add XMP Annotation by code to PDF/TIFF
You use GdPicturePDF I use GdViewer has some problem? and how would you have passed this code in Delphi ?
Re: Add XMP Annotation by code to PDF/TIFF
You understand Loïc, help me ?
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: Add XMP Annotation by code to PDF/TIFF
Hi,
If i understand you correctly you want to add annotations to the PDF file without that GdPicturePDF class because you do not have the PDF plugin. If that I understand you correctly then this is not possible, any PDF manipulation or addition is done through our PDF plugin.
If i misunderstood you, could you please explain exactly what you mean.
Best Regards,
Sami Kharma
GdPicture Support Team Member
If i understand you correctly you want to add annotations to the PDF file without that GdPicturePDF class because you do not have the PDF plugin. If that I understand you correctly then this is not possible, any PDF manipulation or addition is done through our PDF plugin.
If i misunderstood you, could you please explain exactly what you mean.
Best Regards,
Sami Kharma
GdPicture Support Team Member
Who is online
Users browsing this forum: No registered users and 1 guest