NullReferenceException using LoadFromGdPicturePDF() thumbna

Discussions about the ThumbnailEx control of GdPicture.NET.
Post Reply
hardikv
Posts: 43
Joined: Thu Jan 27, 2011 11:46 am

NullReferenceException using LoadFromGdPicturePDF() thumbna

Post by hardikv » Tue Jan 24, 2012 12:35 pm

Hi All,

i have to try to load PDF file and then display on Thumbnail Control. so i have used GdPicturePDF cobject to load pdf file into thumbnail control using LoadFromGDPicturePDF().
but i got error on LoadFromGDPicturePDF() method of thumbnail control. i am using letest GdPicture.Net sdk.

below is my code

Code: Select all

            string strPath="C:\\AAAAAAA\\Mg1.pdf";
            thumbnailEx1.ThumbnailSize = new Size(130, 150);
            thumbnailEx1.CheckBoxes = true;
            thumbnailEx1.MultiSelect = true;
            
            GdPicture.GdPicturePDF objPDF = new GdPicture.GdPicturePDF();
            objPDF.SetLicenseNumber("XXXX");
            objPDF.NewPDF();
            if (objPDF.LoadFromFile(strPath, true) == GdPictureStatus.OK)
            {
                if (!objPDF.IsEncrypted())
                {
                    thumbnailEx1.LoadFromGdPicturePDF(objPDF);
                }
            }
below is the exception i got

Object reference not set to an instance of an object.

at GdPicture.ThumbnailEx.LoadFromGdPicturePDF(GdPicturePDF PDF)
at ImageCenterApplication.AcquireProcess.BindThumbnail(String strPath) in D:\Projects\Application\Image\reProcess.cs:line 99
at ImageCenterApplication.AcquireProcess..ctor(String strFilePath) in D:\Projects\Application\Image\reProcess.cs:line 33
at ImageCenterApplication.di_acquireimage.btnAdd_Click(Object sender, EventArgs e) in D:\Projects\ImageCenterApplication\ImageCenterApplication\di_acquireimage.cs:line 43
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



i have also try to use GdPictureImaging class to load file into Thumbnail control but i got nothing inside GdPictureImaging object. i got 0 as GdPicture Imaging pointer inside m_CurrentImage variable.

Code: Select all

            GdPicture.GdPictureImaging Imaging = new GdPicture.GdPictureImaging();
            Imaging.SetLicenseNumberUpgrade("XXXX","XXXX");
            int m_CurrentImage = Imaging.CreateGdPictureImageFromFile(strPath);
            thumbnailEx1.LoadFromGdPictureImage(m_CurrentImage);

Please provide me solution with example.

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

Re: NullReferenceException using LoadFromGdPicturePDF() thu

Post by Loïc » Tue Jan 24, 2012 5:28 pm

Hello,

This is a bug that we fixed for the next minor release. It will be available within 5 days.

Kind regards,

Loïc

hardikv
Posts: 43
Joined: Thu Jan 27, 2011 11:46 am

Re: NullReferenceException using LoadFromGdPicturePDF() thu

Post by hardikv » Tue Jan 31, 2012 8:00 am

Hi Loic,

Thanks for your early response.

when will you provide next minor release ? i am waiting.

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

Re: NullReferenceException using LoadFromGdPicturePDF() thu

Post by Loïc » Tue Jan 31, 2012 1:48 pm

Hello,

Probably today. We are finalizing regressive tests.

Kind regards,

Loïc

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

Re: NullReferenceException using LoadFromGdPicturePDF() thu

Post by Loïc » Tue Jan 31, 2012 3:39 pm


hardikv
Posts: 43
Joined: Thu Jan 27, 2011 11:46 am

Re: NullReferenceException using LoadFromGdPicturePDF() thu

Post by hardikv » Wed Feb 01, 2012 6:38 am

Hi Loic,

Thank you very much.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest