Page 1 of 1

Driving 2 viewers from one GdPicturePDF Object

Posted: Thu May 10, 2018 11:46 pm
by twhite1365
I am looking for help.
i want to drive 2 GDViewers from one GdPicturePDF object
heres what ive done so far:

loaded a document into the GdPicturePDF object
loaded the GdPicturePDF object into the ThumbnailEX

when this event happens i want to update the 3 GDViewers: ThumbnailEx1_ItemSelectionChanged

Below is the code i am using that is not working
is there anything i can change to make this work?

Code: Select all

Private Sub ThumbnailEx1_ItemSelectionChanged(Idx As Integer, Selected As Boolean) Handles ThumbnailEx1.ItemSelectionChanged
        Dim imager As New GdPictureImaging
        Dim gdl As Integer
        Dim pic As Integer = gdPicPDF.ExtractPageImage(Idx)
        Dim ba As Byte()
        imager.SaveAsByteArray(pic, ba, gdl, GdPicture14.DocumentFormat.DocumentFormatJPEG, 5)        
        ba = Nothing
        imager.SaveAsByteArray(gdPicPDF.ExtractPageImage(Idx + 1), ba, gdl, GdPicture14.DocumentFormat.DocumentFormatJPEG, 5)
    End Sub