I have tried all my possible best to get this working to no avail. I have been testing in a vb.net web application, using Barcode1DWriterCode128, how to
1. Generate, display in gdviewer, print the barcode label (this is not be saved)
2. Write the barcode to an existing document / image displayed in the GDViewer and save to a network location
From all I have read in the forums and the documentation this can only be achieved using javascript.
I have tried generating the barcode server side and it works perfectly well. I could generate the label and save as tiff. I could also add the barcode to an existing file saved ont the system.
Below is code I used. It keeps on giving me "Could not complete the operation due to error 80131509" and fails at Barcode1DWrite function. Could this be failing because I used the actual value of 26 for Barcode1DWriterType.Barcode1DWriterCode128? How do I call that enumerator in the function.
Code: Select all
function addBarcode() {
var oGdViewer = document.getElementById("GdViewer1");
var ImageID = m_GdPictureImaging.CreateNewGdPictureImage(200, 200, 24, oGdViewer.ARGBI(255, 255, 255, 255));
m_GdPictureImaging.Barcode1DWrite(ImageID, 26, "222", 1, 1, 150, 50, m_GdPictureImaging.ARGBI(255, 0,0,0));
m_GdPictureImaging.FontSetUnit(2);
m_GdPictureImaging.DrawText(ImageID, "222", 5, 150, 12, 0, oGdViewer.ARGBI(255, 0, 0, 0), "Verdana", true);
oGdViewer.DisplayFromGdPictureImage(ImageID);
oGdViewer.SetZoom100();
oGdViewer.Redraw();
// oGdViewer.Print();
}
Any fix or solution will be greately appreciated as i am wringing my hands and biting my nails at this point. Totally stumped. Short of pulling my hair off!!!
PS: I used the AnyCPU/aspnet/anotatation sample and just added the function.