Write Barcode1D into an existing tif file

Discussions about barcode reading and writing
Post Reply
davibu
Posts: 2
Joined: Tue Feb 10, 2015 11:16 am

Write Barcode1D into an existing tif file

Post by davibu » Tue Feb 10, 2015 11:34 am

Hi, I have to write a barcode on multipage tif's first page using GdPicture9

Code: Select all

	oGdPictureImaging.TiffOpenMultiPageForWrite(True)
	ImageID = oGdPictureImaging.TiffCreateMultiPageFromFile(sFileInput)
	If (ImageID = 0) Then Err.Raise ...

	PageCount = oGdPictureImaging.TiffGetPageCount(ImageID)
	For iPageIdx = 1 To PageCount

		oGdPictureImaging.TiffSelectPage(ImageID, iPageIdx)
        If (iPageIdx = 1) Then
			Dim align As BarcodeAlign
			GdStatus = oGdPictureImaging.Barcode1DWrite_4( ImageID, Barcode1DWriterType_Barcode1DWriterEAN13, sText, 0, 0, 250, 80, oGdPictureImaging.ARGBI(255, 0, 0, 0), BarcodeAlign_BarcodeAlignCenter, 0)
		End If
		oGdPictureImaging.ConvertTo1Bpp (ImageID) 	'Comment this line to keep true color image

	Next iPageIdx
	oGdPictureImaging.TiffSaveMultiPageToFile(ImageID, sFileOutput, iTIFFCompression)
    oGdPictureImaging.ReleaseGdPictureImage (ImageID)
but when I call Barcode1DWrite_4 I have an automation error

Thanks

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Write Barcode1D into an existing tif file

Post by SamiKharma » Thu Feb 12, 2015 7:54 am

Hi,

Could you please explain what you mean by "automation error". What is the GdPictureStatus you get back?

Best,
Sami

davibu
Posts: 2
Joined: Tue Feb 10, 2015 11:16 am

Re: Write Barcode1D into an existing tif file

Post by davibu » Fri Feb 20, 2015 6:04 pm

Hi,
I have no GdPictureStatus because when I call the method Barcode1DWrite_4 the library crashes
bye

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest