Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, March 13, 2006 1:58:20 PM(UTC)

bjames  
bjames

Groups: Registered
Posts: 22


Hello all,
 
This is my first post to these forums.  I'm currently using the LEAD com objects ver 12.0.
 
I'm trying to implement multipage tiff's in my application.
 
I can load the image pages and display them fine.  When I draw an annotation on the first page, it appears on every page of the tif file.  The AnnLoad method provides a parameter to specify which page to load annotations for, but the AnnSave doesnt and it appears to save the annotation to every page in my tiff file.  I searched the forums and found one post that was similar but the user requested to save the annotations in a tiff and most of the responses were meant for the .NET assemblies.
 
One of the responses made note of the AnnSaveTag method.  Is this the right direction?  Thanks in advance to all responses.
 
We value great support.
 
Thanks again.
 
Bryan James
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, March 15, 2006 12:42:07 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

Saving to a multi-page annotation file using the AnnSave function is available in LEADTOOLS v12.1.

However, you can try to use the AnnSaveTag function to save the annotations as a tag to the TIFF file.
Then you can load the TIFF file with the annotation (Annotations are saved as a tag in the TIFF file) by using the AnnLoad function. The code will be something like follows:
===============================
Lead1.AnnSaveTag True, True Lead1.Save "d:\temp\testwang.tif", FILE_CCITT_GROUP4, 1, 2, SAVE_OVERWRITE
===============================
In the above code, you may try to use the SAVE_APPEAND instead of the SAVE_OVERWRITE to save to a multi-page TIFF files.
===============================
RasterAnn.AnnLoad "c:\testwang.tif", 1
===============================

Please try the above instructions and let me know what will happen with you.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Wednesday, March 15, 2006 5:26:14 AM(UTC)

bjames  
bjames

Groups: Registered
Posts: 22


After looking in my add remove programs, I saw that I have 12.0 and 12.1.  When I checked the component reference in VB6, it says I'm using 12.1 (I think we upgraded).
 
I'm going to try the instructions that you gave me, but is there anyway you can provide examples of how one would do it using 12.1 and AnnSave() ?
 
Thank you very much for your response.
 
Your assistance is greatly appreciated.
 
Thanks again.
 
Bryan James
 
#4 Posted : Wednesday, March 15, 2006 12:55:46 PM(UTC)

bjames  
bjames

Groups: Registered
Posts: 22


I tried the above method (using AnnSaveTag) and when I try to load the tiff's with the annotations, I see a black outinline of a box where the annotation should be.  I can select, move, and delete this box like any annotation however it's not the stamp that I saved in the tiff.
 
Aslo,
 
Like I said, i'm using LEADTools 12.1 (not 12.0, sorry, it's an upgrade) so is there any way you can show me how it's done with AnnSave()?
 
Thanks for your support.
 
Bryan James
 
#5 Posted : Thursday, March 16, 2006 5:35:28 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

I am attaching a small OCX v12 project that shows how to load, save Multi-page TIFF files and Multi-page Annotation files using the AnnSaveTag, Save, AnnLoad and Load methods.
Please recheck the same issues using the attached project and let me know if this helps.
About saving Multi-page annotation files using the AnnSave method, you will not be able to do this in LEADTOOLS v12.1.
But in the current version (LEADTOOLS v14) this feature is supported using the AnnSave method.
If you would like, you can download and try the evaluation version of LEADTOOLS Imaging SDK v14.5 from the following page (press the "TRY" button): http://www.leadtools.com...ent/Document-Imaging.htm

Thanks,
Maen Badwan
LEADTOOLS Technical Support
File Attachment(s):
OCXAnnV12.zip (3kb) downloaded 37 time(s).
 
#6 Posted : Thursday, March 16, 2006 7:36:49 AM(UTC)

bjames  
bjames

Groups: Registered
Posts: 22


Thanks very much for the project.  I'll let you know how it goes.
 
We are currently working on researching/purchasing/implementing your new .NET version but we currently have to deal with some issues with 12.1
 
Thanks again, i'll post the results.
 
#7 Posted : Thursday, March 16, 2006 10:40:38 AM(UTC)

bjames  
bjames

Groups: Registered
Posts: 22


Thanks for the example, however, your example shows the same problems as mine.
 
Attached to this forum post is a zip file that contains screenshots of every step I used, as well as the input and output tiff's.
 
Here are the steps I performed.
 
First I loaded the project.
Then I changed
Private Sub Command1_Click()
LEAD1.Load "c:\fax1.tif", 0, 1, -1
count1 = 0
End Sub
to
Private Sub Command1_Click()
   LEAD1.Load "c:\test\test.tif", 0, 1, -1
   count1 = 0
End Sub
(test.tif is included with the screen shots.)
Then I changed
Private Sub Command4_Click()
LEAD1.AnnSaveTag True, False
LEAD1.SavePage = Count + 1
LEAD1.Save "AnnTestTag.tif", FILE_CCITT_GROUP4, 1, 2, SAVE_INSERT
End Sub
Private Sub Command5_Click()
LEAD1.Load "AnnTestTag.tif", 0, 1, -1
LEAD1.AnnLoad "AnnTestTag.tif", 1
End Sub
to
Private Sub Command4_Click()
   LEAD1.AnnSaveTag True, False
   LEAD1.SavePage = Count + 1
   LEAD1.Save "c:\test\AnnTestTag.tif", FILE_CCITT_GROUP4, 1, 2, SAVE_INSERT
End Sub
Private Sub Command5_Click()
   LEAD1.Load "c:\test\AnnTestTag.tif", 0, 1, -1
   LEAD1.AnnLoad "c:\test\AnnTestTag.tif", 1
End Sub
Then i changed
LEAD1.UnlockSupport L_SUPPORT_DOCUMENT, "Document Unlock Key"
to use our key...
When i ran the app..
Shot1.jpg = Run the application
Shot2.jpg = Click the Load command button
Shot3.jpg = Select the stamp that i want to use
Shot4.jpg = Draw the stamp on the image
Shot5.jpg = Click AnnSetTag command button
Shot6.jpg = Click Clear Image command button
Shot7.jpg = Click AnnLoad command button
(I included the outputfile AnnTestTag.tif so maybe it will help.)
Notice in Shot7.jpg when we try to load the file
you see a red sqaure box.  This box can be moved and
deleted like an annotation but it's not the annotation
that we saved.  That's the problem that I get when
i tried your suggestion in our application.
Thanks for your help and please let me know if you need anything else.
 
Maybe this will help us figure out the problem.
 
Thanks.
 
Bryan James.
File Attachment(s):
SupportScreenshots.zip (521kb) downloaded 31 time(s).
 
#8 Posted : Sunday, March 19, 2006 12:47:41 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

This is not a problem, because in the code, I save only the annotations that are in WANG compatible TIF tag mode.
The rubber stamp annotation object is not supported under WANG mode, so it will be saved and loaded as stamp object.

To save the rubber stamp object, try to set the fWangMode parameter in the AnnSaveTag method to false as follows:
+---------------------------+
LEAD1.AnnSaveTag False, False
+---------------------------+

So, the red square box that appears when loading the Ann file is stamp object.

If this explanation did not help you with your question or if you require further assistance, please let me know.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#9 Posted : Sunday, March 19, 2006 5:14:02 PM(UTC)

bjames  
bjames

Groups: Registered
Posts: 22


So if i understand this correctly, changing to
+---------------------------+
LEAD1.AnnSaveTag False, False
+---------------------------+

Should make the stamp load correctly? because i made the code change and it still only displays the red square.
 
Please let me know if i'm misunderstanding something.
 
Thanks.
 
Bryan James
 
#10 Posted : Monday, March 20, 2006 4:30:54 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

This shouldn't be the case. After saving annotations using the LEAD1.AnnSaveTag False, False method, and then load the result file, you should get the rubber stamp object.
However, I am attaching the project that I used to check this issue. Please recheck the same issue using the attached project and let me know if this helps solve the problem.

Also, what is the build number of the LTANN12N.DLL on your system32 folder?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
File Attachment(s):
OCXAnnV12.zip (26kb) downloaded 33 time(s).
 
#11 Posted : Monday, March 20, 2006 7:54:01 AM(UTC)

bjames  
bjames

Groups: Registered
Posts: 22


  • Thank you very much.  I realized that the old output tif needed to be deleted.  After I did this, the call to AnnSaveTag worked.  I'm modifying your example to try and achieve the exact functionality that I need.  I would like to say that I'm extremely impressed with the support that I've recieved and that we plan to purchase 14.5 because of this.
  •  
    I'll let you know if I hit any bumps while completeting the demo that you sent.
     
    Thanks again.
     
    Sincerely,
     
    Bryan James
     
    #12 Posted : Wednesday, March 22, 2006 12:56:38 AM(UTC)
    Maen Hasan

    Groups: Registered, Tech Support
    Posts: 1,328

    Was thanked: 1 time(s) in 1 post(s)

    Hello,

    I am glad to hear that the problem is fixed now.

    If you need any information about the upgrading prices to v14.5, please contact our sales department at sales@leadtools.com

    Please let me know if I can be of further assistance.

    Thanks,
    Maen Badwan
    LEADTOOLS Technical Support
     
    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.

    Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
    This page was generated in 0.281 seconds.