Page 1 of 1

Write Barcode1D into an existing tif file

Posted: Tue Feb 10, 2015 11:34 am
by davibu
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

Re: Write Barcode1D into an existing tif file

Posted: Thu Feb 12, 2015 7:54 am
by SamiKharma
Hi,

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

Best,
Sami

Re: Write Barcode1D into an existing tif file

Posted: Fri Feb 20, 2015 6:04 pm
by davibu
Hi,
I have no GdPictureStatus because when I call the method Barcode1DWrite_4 the library crashes
bye