multiple tiff files in BookmarksTree viewer

Discussions about the ThumbnailEx control of GdPicture.NET.
Post Reply
cealex
Posts: 3
Joined: Wed May 04, 2011 4:28 pm

multiple tiff files in BookmarksTree viewer

Post by cealex » Wed May 04, 2011 4:49 pm

Hi All,


it's possible to loaded multiple tiff files into a GdPicture BookmarksTree viewer and showing all of them.

I saw a example using AddItemFromGdPictureImage method but for the ThumbnailEx class,

I would like something like this:

BookmarksTree1.additemxxx ( m_ImageID_1);
BookmarksTree1.additemxxx ( m_ImageID_2);

Can it be done?

regards,

User avatar
Loïc
Site Admin
Posts: 5702
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: multiple tiff files in BookmarksTree viewer

Post by Loïc » Wed May 04, 2011 5:57 pm

Hi,

To add several pages of a multipage tiff image in the thumbnail control you have to select frame and add them:

Code: Select all

For I as integer = 1 to TiffGetPageCount(m_ImageID_1)
   oGdPictureImaging.TiffSelectPage(m_ImageID_1)
   BookmarksTree1.AddItemFromGdPictureImage (m_ImageID_1)
Next I
Hope this helps !

cealex
Posts: 3
Joined: Wed May 04, 2011 4:28 pm

Re: multiple tiff files in BookmarksTree viewer

Post by cealex » Wed May 04, 2011 6:58 pm

thank you for your quick response.

I'm developing in c# , vs 2008,

the code i'm using is

Code: Select all

            GdViewer1.ZoomMode = ViewerZoomMode.ZoomModeFitToViewer;
            m_ImageID = oGdPictureImaging.CreateGdPictureImageFromFile("");
            if (m_ImageID != 0)
            {
                GdViewer1.DisplayFromGdPictureImage(m_ImageID);

                for (int i = 0; i < oGdPictureImaging.TiffGetPageCount(m_ImageID); i++)
                {                    
                    oGdPictureImaging.TiffSelectPage(m_ImageID,i);                    
                    //BookmarksTree1.additem
                }                                
                ThumbnailEx1.AddItemFromGdPictureImage(m_ImageID);                
                ThumbnailEx1.Refresh();
            }
The BookmarksTree1 doesn't have the AddItemFromGdPictureImage method,
so I'm a bit lost ...

User avatar
Loïc
Site Admin
Posts: 5702
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: multiple tiff files in BookmarksTree viewer

Post by Loïc » Thu May 05, 2011 4:57 pm

Hi,

Well, you should update your version to the latest available. See: http://www.gdpicture.com/download/downl ... urenet.php

cealex
Posts: 3
Joined: Wed May 04, 2011 4:28 pm

Re: multiple tiff files in BookmarksTree viewer

Post by cealex » Thu May 05, 2011 6:49 pm

i decide to implement my own treeview, thank you anyway ...

I don't want to update to the last version because i'm using the "beta" release with the Imprinter's methods, and i'm affraid
that this methods are not yet available in that version ...
/*
TwainEnableImprinter()
TwainGetAvailableImprinterModeNo()
TwainGetAvailableImprinterModeCount()
TwainIsImprinterAvailable()
TwainIsImprinterEnabled()
TwainGetImprinterMode()
TwainSetImprinterMode()
TwainGetImprinterString()
TwainSetImprinterString()
TwainGetImprinterSuffix()
TwainSetImprinterSuffix()
TwainSetImprinterIndex()
TwainGetImprinterIndex()
*/

User avatar
Loïc
Site Admin
Posts: 5702
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: multiple tiff files in BookmarksTree viewer

Post by Loïc » Thu May 05, 2011 7:13 pm

Hi,

The latest version already contains all method you were using in the Beta. I already told you that via the Helpdesk area...

Kind regards,

Loïc

User avatar
Loïc
Site Admin
Posts: 5702
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: multiple tiff files in BookmarksTree viewer

Post by Loïc » Thu May 05, 2011 7:19 pm

Hi,

Damns I am sorry. I made confusion between the BookMarkTree object and the ThumbnailEx control. I am really sorry.

Well, you can't use the BookMarkTree to handle several document as you probably understood....

A workaround consists to create an editable multipage Toff in memory. This can be easy to do with acceptable performances and memory consumption.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests