BarCodeException "Required size is not allowed. Barcode can not be so small"

When converting a docx file containing a QR barcode, we are getting the BarCodeException “Required size is not allowed. Barcode can not be so small.”

The exception is raised within your sample class “CustomBarcodeGenerator” - Generate Custom BarCode for DISPLAYBARCODE|Aspose.Words for .NET

We are using Aspose.Barcode version 19.10 (with .NET 4.0).

I’ve attached the code and the docx file to this message.SSCCE2.zip (20.2 KB)

Please advise how we may overcome this error.

Regards
Paul

@swiftyFA,
I have reviewed the sample code and observed that if we use scale value 0.4, it creates too small QRCode which cannot be detected properly. You may please set this value to 1 or greater than this which will create proper output file. We will update this example soon to create appropriate output file.

const float scale = 1.0f; // Empiric scaling factor for converting Word barcode to Aspose.BarCode

Your suggested fix does indeed produce a QR code but I don’t believe it is the correct size. If I use MS Word and save the DOCX as PDF, the QR code is much bigger.

Can you please advise how I can make the QR code created by Aspose.Barcode the same size as that created by MS Word?

@swiftyFA,
We are looking into this requirement and will write back here once feedback is ready to share.