Save current barcode symbol in the barcode component to an image file. The barcode component is specified by the Barcode2D property.
function Save(FilePath: string): Integer; virtual;
The method saves the barcode symbol to an image file. The barcode symbol is defined in the barcode component that's specified by the Barcode2D property. Also, the TImage component isn't required in the Image property of the barcode component.
An OnSave event will occur before save the barcode symbol to picture file. And an OnSaved event will occur after the barcode symbol is saved.
FilePath: String; Specifies the file path and name for the image file.
This method can return one of these values (these consts are defined in the pfmxSave2D unit):
ERROR_OK (0): The method invocation succeeded.
ERROR_NO_BARCODE_COMPONENT (1): The method invocation failed because the Barcode2D property is not link to a barcode component.
ERROR_INVALID_BARCODE (2): The method invocation failed, because the length of Barcode or Data property value is invalid in the barcode component, corresponding to the OnInvalidLength or OnInvalidDatalength event of barcode component will occur. Or because there is any invalid character in the Barcode or Data property value, corresponding to the OnInvalidChar or OnInvalidDataChar event of barcode component will occur.
ERROR_WRITE_PICTURE (3): The method invocation failed because of a picture file write error. Perhaps the file system fulls, or the access is denied.
ERROR_UNKNOWN (4): The method invocation failed because of othe error.