bnomei / kirby3-qrcode

Generate QRCodes easily.
https://forum.getkirby.com/t/plugin-qr-code-field-and-page-method/6798
MIT License
12 stars 3 forks source link

Set format for field link #17

Open dgsiegel opened 2 years ago

dgsiegel commented 2 years ago

On the frontend I'll generate a QR code in SVG and/or PDF to allow users to print or modify the qr code to their needs.

In the backend I'd like to offer the same possibility. One way would be of course to link to the same url, ie. {{ page.url }}.qr. But it would also be very cool to allow format and/or size for the linked qr code. Something like:

  "bnomei.qrcode.field" => [
    "format" => "pdf",
  ],

The preview would still have to be a png file of course.

bnomei commented 2 years ago

that would mean a bigger change in my api since right now i am just displaying whatever the endpoint returns. i will take a look but dont get your hopes up high.

what you could do in the meantime is using a janitor plugin to offer a download as pdf button right below the qrcode field. that button can take a custom php code where you define the download to be a pdf file. thats how i solved it in a project of mine.