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

Free Support Forum - aspose.com

SwissQRCodetext: last New-Line too much

We are using Aspose.BareCode for .NET, 21…8.0.0 and in it the implementation of: SwissQRCodetext

It works fine but we have one issue. After the End-Tag (EPD-Trailer) there is an unecessary New-Line (CR-LF):

image.png (102.9 KB)

According to the Swiss-Standard, the last New-Line should avoided:

image.png (37.9 KB)

Is there a setting to achiev that or is there an update planned?

Tom Moor


Could you please share your sample code (runnable) and image(s) to show the issue, we will evaluate the issue and log appropriate ticket(s) for it.

Thanks for getting back to me! Here is the simplified sorce that we are using:

	public void Test_ComplexBarcodeGenerator()
		SwissQRCodetext qrCodeText = new SwissQRCodetext();
		qrCodeText.Bill.Version = SwissQRBill.QrBillStandardVersion.V2_0;

		qrCodeText.Bill.Account = "CH4431999123000889012";
		qrCodeText.Bill.Amount = 1000m;
		qrCodeText.Bill.Currency = "CHF";
		qrCodeText.Bill.Reference = "210000000003139471430009017";

		qrCodeText.Bill.Creditor = new Address
			                           Name = "Robert Schneider AG",
									   Street = "Rue de Lac",
									   HouseNo = "1268",
			                           PostalCode = "2501",
			                           Town = "Biel",
			                           CountryCode = "CH"

		qrCodeText.Bill.Debtor = new Address
			                         Name = "Pia-Maria Rutschmann-Schnyder",
			                         Street = "Grosse Marktgasse",
			                         HouseNo = "28",
			                         PostalCode = "9400",
			                         Town = "Rorschach",
			                         CountryCode = "CH"

		ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(qrCodeText);
		generator.Parameters.Barcode.QR.QrEncodeMode = QREncodeMode.ECIEncoding;
		generator.Parameters.Barcode.QR.QrECIEncoding = ECIEncodings.UTF8;
		MemoryStream stream = new MemoryStream();
		generator.Save(stream, BarCodeImageFormat.Bmp);

		Stream fs = new FileStream(@"C:\Temp\Bmp1.bmp", FileMode.Create, FileAccess.Write);

		stream.Seek(0, SeekOrigin.Begin);
		fs.Seek(0, SeekOrigin.Begin);


this give the following QR-Code:
image.png (18.7 KB)

And that corresponds to the following text, which is all correct exept the last new-line (CR-LF) is to much (in yellow). According to the specification, this should be omitted:

image.png (7.3 KB)



Thanks for the samples.

Please notice, I am able to reproduce the issue as you mentioned regarding SwissQRCodetext. It works ok but after the End-Tag (EPD-Trailer) there is an unnecessary New-Line (CR-LF) as you pointed out. I have logged a ticket with an id “BARCODENET-38125” for your issue. We will investigate your issue and try to figure it out soon.

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

Thank you for getting back to me and open up a ticket about this issue!


You are welcome.


We are pleased to inform you that we have fixed your issue now. The fix will be included in our upcoming releases. Once the hot fix is published, you will be notified here in the thread.

1 Like

That’s great! Thank you!


You are welcome.


The issue logged as [Ticket ID: BARCODENET-38125] has been resolved in Aspose.BarCode for .NET 22.3 (Download | NuGet). Please try it and in case you still find any issue, let us know with details.