LEADTOOLS Support
Document
Document SDK Questions
Re: Saving Annotations in TIF and PDF (VB.NET)
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, December 12, 2012 12:37:28 PM(UTC)
Groups: Registered
Posts: 12
[split by moderator from post 42030 because it's new issue]
Hi Maen,
How about saving the annotation as part of the image. Is the method same for TIF and PDF Files?
Our prefered image types are TIF and PDF.
Could you provide the lines of code to save the annotation with image which will fit in the project
that you have provide?
Thanks
Francis Thomas
#2
Posted
:
Wednesday, December 12, 2012 11:17:14 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
If you mean that you want to save the annotation objects to a TIFF tag, you can do this by using the following code:
+-----------+
//Save the image as TIF format
Dim codecs As New RasterCodecs()
codecs.Save(RasterImageViewer1.Image, "..\..\Res.tif", RasterImageFormat.Tif, 24)
//Write the annotations to the TIF file
Dim ann As New AnnCodecs
Dim tag As RasterTagMetadata = ann.SaveToTag(automation.Container, AnnCodecsTagFormat.Tiff)
If (Not tag Is Nothing) Then
codecs.WriteTag("..\..\Res.tif", 1, tag)
End If
+-----------+
For more information, please see the following online help topic:
http://www.leadtools.com/help/leadtools/v175/dh/an/leadtools.annotations~leadtools.annotations.anncodecs~savetotag.html
About annotations with PDF files, we recently added the ability to write native PDF annotations to PDF files. To get more details, please send an email to
support@leadtools.com and mention this forum post in your email to support.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Monday, December 17, 2012 12:46:16 PM(UTC)
Groups: Registered
Posts: 12
Hi Maen,
I have included the code in the project . It just saves the image in TIF format, the annotation is not saved into the image. The code do not generate any errors. Do I need to do anythig more?
Thanks
Francis Thomas
#4
Posted
:
Monday, December 17, 2012 9:28:44 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Francis,
The code saves the annotation objects in the TIFF file Tags. If you mean that you want to burn (realize) the annotations directly on the image, you can do this using the automation.Realize() method. For more information, see the following online help topic:
http://www.leadtools.com/help/leadtools/v175/dh/an/leadtools.annotations~leadtools.annotations.annautomation~realize.html
Thanks,
Maen Badwan
LEADTOOLS Technical Support
LEADTOOLS Support
Document
Document SDK Questions
Re: Saving Annotations in TIF and PDF (VB.NET)
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.