write_qr.json
The JSON file of the “QR codes” example. The code an invoice, a boarding pass or a label ends up wanting, drawn into the document rather than fetched as a picture and pasted in.
This file is a request: an application sends it over the network to the server, which creates the PDF and sends it back. It makes the same page as the Rust and Python versions of this example. A request names every file it uses, never its content; the call carries the request and the files together. A font the server already holds, such as DejaVuSans, is named with nothing attached. Send the request to the address the API page gives.
What this example is for
QR is the code most documents end up wanting: a payment to make on an invoice, a boarding pass, a link to a case file, a serial number on a label. It is also the one most often fetched from some website, downloaded as a picture and pasted in — which works until the day the picture is resized and the code stops reading.
What this example shows
- QR codes drawn line by line, sharp at any size.
- The white margin the standard requires, kept around each code.
- Every code captioned with the text it carries.