Custom TAG deleted after InsertTIFFImage

Document Imaging SDK,
Image SDK,
Annotation SDK,
Cover Page Generator

Moderator: Technical Support Team

Post Reply
Posts: 6
Joined: Wed Jul 15, 2009 9:42 am

Custom TAG deleted after InsertTIFFImage

Post by ScottWGast » Wed Dec 28, 2011 10:32 am

I am storing a TAG value into a multipage TIFF file, but when I save the image using InsertTIFFImage, the TAG value disappears.

strDate := Self.editCollationDate.Text;
BITIffObj := TBITiff.Create((ActiveMDIChild as TMDIChild));
iCurrentPage := (ActiveMDIChild as TMDIChild).nCurrentPage;
BITiffObj.DeleteTag(m_szFilePath, iCurrentPage, C_TIFF_COLLATIONDATE_TAG);
if BITiffObj.AddStringTag(m_szFilePath, iCurrentPage, C_TIFF_COLLATIONDATE_TAG, strDate) then
ShowMessage('TAG ' + strDate + ' saved.');

The above code successfully adds the date into the tag (C_TIFF_COLLATIONDATE_TAG) so that if I just exit from the program the TAG is in place, so I guess that the AddStringTag writes directly to the disk file. I am able to flip through the pages of the TIFF image and successfully retrieve and display the value stored in C_TIFF_COLLATIONDATE_TAG for each page. I can exit and reload the .TIF file and the values are still in the file.

If I rotate (or otherwise manipulate) a page, I must use the InsertTIFFImage function to save that new version of the page, but after I call InsertTIFFImage, the value of the tag C_TIFF_COLLATIONDATE_TAG is gone.

Any insight would be helpful.

Scott Gast

Post Reply