manuelbl/SwissQRBill

Increase size of qr

gomesm1209 opened this issue · 6 comments

Hi,

I use your librairy for generate our QRBilll and the bank say that the QR-Code need to be bigger 46x46mm. How can I increase the size?

The bank say also that the position need to be corrected. How can I do that with your library?

(see example on attachement)
Thanks in advance
Marine

I am pretty sure that this library creates QR bills with the correct size and position.

In the attached PDF file, I note that the dashed lines do not go to the edge of the paper, neither on the left and right side, nor at the bottom. So the QR bill has been scaled and re-positioned.

Assuming that the original document was a PDF and was correct, it could be caused by a PDF viewer software used to print the QR bill. Most of them (including browsers) tend to scale the PDF to about 95% to make it "fit to page width". Whoever annotated the QR bill is also aware of this general challenge with QR bills sent by email and printed by the customer ("check your printer settings")

You don't provide any information how the PDF was generated. Was it directly generated by this library? Or was the QR bill inserted into another document, which then generated a PDF or similar document? In the latter case, many additional causes are possible.

Please also note that the document anonymization is moot. The covered information is also contained in the QR code and can be revealed by any smartphone.

I think I found the solution by putting as OutputSize QR_BILL_EXTRA_SPACE.

We don't have any details how you use the library. So it's difficult to comment. But it sounds strange.

By the way, Laser printer cannot print without border, this ist he reason that the dashed lines do not go to the edge of the paper.

Some printers even have a border of 10mm. In that case, not just the lines but also part of the text is cut off. It's also the reason why most software will automatically scale it down.

In the sample you have provided yesterday, it looked as if the document was scaled and not cut off. I derive this from the position of the text.

I doubt you have already gotten to the bottom of the cause. I'm happy to support you. But I would need the details of how the document is generated, what the overall process looks like (is the invoice sent by email and then printed by the cusotmer?) and I would need a sample of the QR bill (and not just a scanned version).

I'm afraid the attachment didn't arrive in the issue. You might want to log in to GitHub and respond in this issue instead of replying by email.

I've tested your code with some modification for missing instance variables like facture and fileStorageLocation. It works as expected and adds a new page to an existing PDF. For the QR bill payment slip, all the elements have the expected size and the dashed lines go to the edge of the page.

So causes are likely:

  • Your software and the generated PDF document are correct, but the customer printed the document with a scaling factor of 95% (or similar).
  • The invoice without the QR bill page has a strange size or format that causes an issue with the QR bill page or with printing it.

It would be helpful if you could try again to attach the resulting PDF file.

BTW: This is the PDF I'm get:

invoice.pdf