Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, October 27, 2005 10:05:50 AM(UTC)

valk01  
valk01

Groups: Registered
Posts: 4


Hi All!

I that posible to generate 1D barcode and display it on aspx page inside html table?

Thanks,

Victor

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, October 31, 2005 3:41:14 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Yes, that is possible.  I do not have a sample right now, but  if you need one I will try to write one for you.

Bashar Abdulqaiyume
LEAD Technologies, Inc.
 
#3 Posted : Friday, November 4, 2005 3:32:06 AM(UTC)

valk01  
valk01

Groups: Registered
Posts: 4


Thanks Bashar.

I was able to generate Raster Image object in the memory. Now I need to stick this image inside <td> tag

 

Please help.

Here is my code..

 

    Private Function CreateLeadBarcodeImage(ByVal sText As String, ByVal iBarcodeType As Integer) As RasterImage

 

        Dim iWidth As Integer = 0

        Dim iHeight As Integer = 0

 

        Dim newImage As RasterImage

        newImage = New RasterImage(RasterMemoryFlags.Managed, 400, _

                400, 1, RasterByteOrder.Bgr, RasterViewPerspective.TopLeft, Nothing, Nothing)

 

        Dim command As Leadtools.ImageProcessing.FillCommand = New Leadtools.ImageProcessing.FillCommand

        command.Color = New Leadtools.RasterColor(255, 255, 255)

        command.Run(newImage)

 

        Dim objAxLEADBarCode As New LTBARLib.LEADBarCodeClass

 

        'unlock support

        RasterSupport.Unlock(RasterSupportType.Barcodes1d, "testkey")

        objAxLEADBarCode.UnlockSupport(LTBARLib.tagSupportLockConstants.L_SUPPORT_BARCODES_1D, "testkey")

 

        Dim nret As Integer

 

        'Convert IRasterImage to LEAD OCX Image

        Dim ocxbitmap As IntPtr = RasterImageConverter.ToLeadBitmap(newImage, "LTKRN14N.DLL")

        objAxLEADBarCode.Bitmap = ocxbitmap.ToInt32()

        Marshal.FreeHGlobal(ocxbitmap)

 

        objAxLEADBarCode.Units = LTBARLib.tagBARCODE_UNITS.BARCODE_SCANLINES_PER_PIXELS

 

        With objAxLEADBarCode.Linear

            .EnableErrorCheck = True

            .EnableWriteText = True

        End With

 

        'Write Barcode

        nret = objAxLEADBarCode.Write(iBarcodeType, sText, 0, 0, 400, 65)

 

        'Convert LEAD OCX Image to IRasterImage

        newImage = RasterImageConverter.FromLeadBitmap(New IntPtr(objAxLEADBarCode.Bitmap), "LTKRN14N.DLL")

 

        objAxLEADBarCode.Bitmap = 0

        objAxLEADBarCode = Nothing

 

        Return newImage

 

    End Function

 

Thanks again

 

Valk

 
#4 Posted : Monday, November 7, 2005 11:46:58 PM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Hi Valk,

The following HTML code sticks an image in a table cell.  Is that what you want?

<table border = "1">
<tr>
<td><img src="D:\Customers\CLF.jpg"/></td>
</tr>
</table>

You need to save the image to disk first.
 
#5 Posted : Tuesday, November 8, 2005 5:37:35 AM(UTC)

valk01  
valk01

Groups: Registered
Posts: 4


Hi Bashar!

Thanks.

Let me ask you one more question. Is saving image to the disk would be the only one option? Or I can still display image from the memory, using something like response.OutputStream.

 

 
#6 Posted : Wednesday, November 9, 2005 12:57:54 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Hello,


After writing the barcode to the image, try saving the image to a
memory stream then calling Response.BinaryWrite to write the stream to the client.  I hope this helps.

Bashar
 
#7 Posted : Friday, November 11, 2005 7:13:00 AM(UTC)

valk01  
valk01

Groups: Registered
Posts: 4


Do you have any examples how to do this?  Even after saving image to a memory stream, how would you display it inside <td> tag.

Thanks

 
#8 Posted : Thursday, November 17, 2005 6:08:30 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Just specify the URL of the page that calls Response.BinaryWrite in the SRC attribute of the <IMG> tag.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.105 seconds.