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 : Wednesday, November 4, 2009 1:09:49 AM(UTC)

m_tzou  
m_tzou

Groups: Registered
Posts: 8


Hello ,

I am trying to evaluate version 16.5 and i have a problem nultipage and multiannotations tiff files and i would really need some help..
Well my problem is described below:
I have a multipage tiff file and i load it in order to place annotations in different pages each time..
My first problem is when i make the following steps
1. i load page 1
2. i put an annotation in page 1
3. i press next and load page 2
4. i press previous and load page 1
My problem is that the Annotation i had put in STEP 2 HAS GONE!!

Other than that i cannot save the annotations..
I have tried many methods that i had read and also many things that i found in this forum..

I am using the OCX Main Control..
I don't know if it's of any help but i 'll try to include some snippets

NEXT BUTTON
PageNo = PageNo + 1  //Where pageNo is the active pageNo any time
this.ole_image16.object.BitmapListIndex = PageNo
this.ole_image16.object.ForceRepaint()
il_index = PageNo

ll_nRet = this.ole_image16.object.AnnLoad( is_annotationpath ,this.ole_image16.object.BitMapListIndex + 1  ) // this line was placed in order to load the annotations for each page each time..This might be wrong but even if i take out it does not work!!
this.ole_image16.object.ForceRepaint()


PREV BUTTON
PageNo = PageNo - 1  //Where pageNo is the active pageNo any time
this.ole_image16.object.BitmapListIndex = PageNo
this.ole_image16.object.ForceRepaint()
il_index = PageNo

ll_nRet = this.ole_image16.object.AnnLoad( is_annotationpath ,this.ole_image16.object.BitMapListIndex + 1  ) //
this line was placed in order to load the annotations for each page each time..This might be wrong but even if i take out it does not work!!

this.ole_image16.object.ForceRepaint()


SAVE BUTTON - I have tried to loop through alla pages and save each page but my problem is that the pages have kept no annotations
for ll=1 to NoOfPagesActive
    this.ole_image16.object.BitmapListIndex = ll - 1
    this.ole_image16.object.ForceRepaint()
    if this.ole_image16.object.AnnContainer = 0 then
    else
        ll_nRet = this.ole_image16.object.AnnSave(is_annotationpath , 5, False, 3 , ll)
    End if   
Next   



Thank you in advance
Maria
 

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, November 4, 2009 6:36:37 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

Maria,
Each page of the multi-page file can have its own set of annotation objects. When you move from one page to another, your code should save any changes made to the annotation objects for that page. The AnnSave should work for that, but I won't be able to know the cause of the problem unless I can test the code here.
Which programming language are you using?

 
#3 Posted : Thursday, November 5, 2009 1:31:53 AM(UTC)

m_tzou  
m_tzou

Groups: Registered
Posts: 8


Hello Basel ,

Thank you very much for the great support not only from you but from everybody there in the SupportTeam..The help you are offering is great...

So to the point..I had completely misunderstood the use of the annotations files.. I had understood that the AnnSave was referencing the total multipage tif and not only for each page..
I tried what you suggested and it worked.. So now i can have multi annotations in each page and in different pages..

Tring that, i came up with 2 more questions if you could help me again(thank you in advance)..
1. My first question is : In a multi-page tiff file with your help i placed annotations according to the psedo code
i. annontations on page1
ii. move on to page2 (in this step i save the annotations in page1)
iii. annotations on page2
iv. save annotations on page2...
etc...with the above steps everything works normal and i am able to see the annotations where i have placed them..
My problem is when i place annotations first in page2 and then in page1. In this case the annotations of page2 are shown in page1.. As a workaround - i have read that in an older post i think - i am thinking of inserting in the annotation file as many page tags as the number of pages of my multipage tiff. I think this should work.. But is this right or i am i doing something wrong and that is why i cannot see the annotations in the right place??

Also could you please explain me how AnnSave works. In the help "AnnSave method (Main Control)" i read that it creates the file and then according to the iModifyproperty it has different reactions..
So i am assuming that if the annotation file does not exists (our tiff has no annotations) then AnnSave saves all the annotations in the first page..
If the annotation file exists and has only one page tag if i try to save an annotation in the page 2 by using AnnSave (SAVE_REPLACE ) then i get an error 20310. In order to place these annotations i must use the AnnSave (SAVE_INSERT) and then it work fine.. Here is my second question : in order to use AnnSave (SAVE_REPLACE ) i must have in the annotation file as many page tags() as the number of SavePage (argument in AnnSave)??

I hope you can understand all i have said above - in my mind is complicated - hope what i asked can make sense to you.. As far as the AnnSave questions i am asking because i would like to catch all the cases in my application and maybe there is something that a haven;t thought of..

Thank you very very much for reading all of this long post and also thank you for your help again..

Maria

Edited by moderator Thursday, August 8, 2019 9:57:03 AM(UTC)  | Reason: Not specified

 
#4 Posted : Thursday, November 5, 2009 1:39:37 PM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

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

Maria,
There are 2 ways to save and load annotations in LEADTOOLS, and the answer depends on the way you're using:
1) You can save them inside the TIFF file itself in TIFF tags.
2) Or you can save them in an external ANN file.

The first way only works with TIFF files because other formats don't support the tags.
The second way works with TIFF and any other file format.

If you're saving in TIFF tags, there should be no problem because the page number is controlled by the TIFF file itself. This means you can save annotations in page 2 without having page 1.

However, if you save in a separate ANN file, you cannot have page 2 unless you save page 1 first.
If you don't have any objects on page 1, this does not matter. You can save annotations page even if the annotations container is empty.

About replacing a page, you are right. You can only replace a page that exists. If you want to add a new page, you must use the SAVE_INSERT (beginning or middle of pages) or SAVE_APPEND (end of pages).

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#5 Posted : Monday, November 9, 2009 2:58:07 AM(UTC)

m_tzou  
m_tzou

Groups: Registered
Posts: 8


Thank you very much for the help..It really helped me with my project..
 
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-2024, Yet Another Forum.NET
This page was generated in 0.152 seconds.