We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Pdf417.GetAngle() returns radian and not degree && angle wrong and inconsistent (in .NET)

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();
                            var compressedBarcodePdf417 = readerPdf417.GetCodeBytes();

This seems like an error in the Aspose library, or do I do something wrong?

I hope someone may help!

Best regards

1 Like

Hi Frank,
I experienced the same issue, hope there is a solution for that soon!
best regards


We were able to observe both the issues but we need to look into them more. We have logged the issues in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

These issues are logged as follows:

BARCODENET-37145 - BarCodeReader.GetAngle() returns radians instead of degree
BARCODENET-37146 - Inconsistent angle fethced for barcodes with same oreintation

Hello @ahsaniqbalsidiqui
Thanks for your confirmation of the issues.
Do you have ab estimation how long the fix will take for
BARCODENET-37145 - BarCodeReader.GetAngle() returns radians instead of degree
BARCODENET-37146 - Inconsistent angle fethced for barcodes with same oreintation
Best regards


I am afraid there is no definite ETA on the issues. You may expect the fix in the fourth quarter of 2019.

Once we have an update on it, we will let you know.

Same issue, I hope that we will have it fixed soon


Once it is resolved or any update is available, we will let you know here.

Hi Amjad_Sahi,

‘fourth quarter of 2019’ is very late! My project heavily relies on the method getAngle() for the barcode PDF417 (because there are multiple barcodes PDF417 on one page and the data needs to be put together in the correct order). Is there at least a work around or some other possibility to get the patch faster? Can you recommend a different library?

best regards


We are sorry for the misunderstanding as ETA was around fourth quarter of Mar 2019. The updated version containing these fixes will be released within a week. We will write back here as soon as this version is released and ready for download.

Hi all, new version 19.3 with the fix was released. I re-tested some first cases and they work well now. Thank you


Yes, both issues (“BARCODENET-37145” and “BARCODENET-37146”) are fixed in the latest version, i.e., Aspose.BarCode for .NET v19.3. A notification (about the release) will be posted shortly here too.

The issues you have found earlier (filed as BARCODENET-37145,BARCODENET-37146) have been fixed in Aspose.BarCode for .NET 19.3. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi