Page 1 of 1

multiple tiff files in BookmarksTree viewer

Posted: Wed May 04, 2011 4:49 pm
by cealex
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,

Re: multiple tiff files in BookmarksTree viewer

Posted: Wed May 04, 2011 5:57 pm
by Loïc
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 !

Re: multiple tiff files in BookmarksTree viewer

Posted: Wed May 04, 2011 6:58 pm
by cealex
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 ...

Re: multiple tiff files in BookmarksTree viewer

Posted: Thu May 05, 2011 4:57 pm
by Loïc
Hi,

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

Re: multiple tiff files in BookmarksTree viewer

Posted: Thu May 05, 2011 6:49 pm
by cealex
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()
*/

Re: multiple tiff files in BookmarksTree viewer

Posted: Thu May 05, 2011 7:13 pm
by Loïc
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

Re: multiple tiff files in BookmarksTree viewer

Posted: Thu May 05, 2011 7:19 pm
by Loïc
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