manuelbl/SwissQRBill

How can i generate only swiss Qrcode in png format

Surya-0173 opened this issue · 9 comments

How can i generate only swiss Qrcode in png format

I'm unsure how to understand your question. What does "only" refer to?

  • Are you stuck generating only the QR code (as opposed to the full payment slip)?
  • Or are you stuck generating PNG (instead of SVG or PDF)?

i am able generate full payment slip but i need only Qrcode img with swiss logo.not full payment slip

Starting with the example on the GitHub project home page, just change this line from:

        format.setOutputSize(OutputSize.QR_BILL_ONLY);

to:

        format.setOutputSize(OutputSize.QR_CODE_ONLY);

Only QRCODE is generated succesfully .but not able to scaning this Qrcode

full payment slip able to scan but only Qrcode not able to scaning

For given bill data, the QR code will be the same whether it is generated stand-alone or as part of the payment slip.

When you generate the QR code only, you need to print or display it with a white background and white border. Is this the case?

For further analysis, please add the generated images or screenshots of both the non-working QR code and the working payment slip to this discussion (using the same bill data for both cases).

how to add white background in current code or need to add extra code. while uploading generated images for both getting error so explaining both conditions. QRbill generated with full payment displaying as per given example and working,but only Qrcode image generated with black background and no white border

The generated QR code image has a transparent background and no border. Wherever you print or display it, you have to show the QR code with a white (or otherwise very bright) background and with a border of the same color. The Swiss QR code library does not do this.

thanks.