Hi everyone,
I have two issues with the GetAngle() method while using it with the PDF417 Barcode.
1.) Returns a Radian instead of Degree. Expected a degree value as documented here: https://apireference.aspose.com/barcode/net/aspose.barcode.windows.forms/barcodegeneratorcontrol/properties/rotationangle
2.) On a page which is rotated 90 degrees to the right (or left) with six PDF417 Barcodes which all have the same orientation, the method GetAngle() reads out the correct angle (even though it is a radian) for the first four. For the last two, it always reads out the wrong angle (+180 degree).
Here is an example file: example.jpg (1.3 MB)
Here is a screenshot of wrong angle read out: example.png (96.4 KB)
Here is the code I used:
var img = Image.FromFile(tifFilePath); using (var bitmap = new Bitmap(img)) { using (var readerPdf417 = new BarCodeReader(bitmap, DecodeType.Pdf417)) { var compressedBytes = new List<byte>(); var angleValues = new List<float>(); while (readerPdf417.Read()) { var actualAngle = readerPdf417.GetAngle(); angleValues.Add(actualAngle); var compressedBarcodePdf417 = readerPdf417.GetCodeBytes(); compressedBytes.AddRange(compressedBarcodePdf417); } } }
This seems like an error in the Aspose library, or do I do something wrong?
I hope someone may help!
Best regards