GDViewer

Example requests & Code samples for GdPicture Toolkits.
Post Reply
rpicilli
Posts: 50
Joined: Fri Nov 25, 2011 12:39 pm

GDViewer

Post by rpicilli » Mon Dec 12, 2011 12:03 am

After loading a file into a gdviewer component, how can I use this component to apply a Barcode on it, for example?

I know how to put a Barcode on a Tiff or PDF document using the examples on the manual but if I have the document already loaded on a gdviewer, can I add a barcode on it?

Regards

Rogerio

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

Re: GDViewer

Post by Loïc » Mon Dec 12, 2011 12:41 pm

Hi,

here the steps:

1 - You have to load the image using the GdPcitureImaging class. You will obtain a GdPicture Image Identifier (ImageID)
2- Load the GdPicture Image on the GdViewer but using the DisplayFromGdPictureImage() method
3- Draw your barcode on your image, from GdPictureImaging
4- Call the Redraw() method of the GdViewer, and then you will see your barcode displayed.

Hope this helps !

Kind regards,

Loïc

rpicilli
Posts: 50
Joined: Fri Nov 25, 2011 12:39 pm

Re: GDViewer

Post by rpicilli » Wed Dec 14, 2011 2:00 am

Thank you Loïc.

Could you please send me some code example?

Best regards

Rogerio

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

Re: GDViewer

Post by Loïc » Wed Dec 14, 2011 1:21 pm

Sure:

Code: Select all

        Using oGdPictureImaging As New GdPictureImaging
            Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("")
            GdViewer1.DisplayFromGdPictureImage(ImageID)
            oGdPictureImaging.Barcode1DWrite(ImageID, Barcode1DWriterType.Barcode1DWriterCode128, "0123456789", 100, 100, 100, 20, Color.Black)
            GdViewer1.Redraw()
        End Using

rpicilli
Posts: 50
Joined: Fri Nov 25, 2011 12:39 pm

Re: GDViewer

Post by rpicilli » Thu Dec 15, 2011 12:04 am

Thank you again Loïc.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest