Use Angle inside profiles when calling POST https://api.pdf.co/v1/barcode/generate. It rotates the barcode or QR code being generated.
Angle accepts the following integer codes. Enter 1 for a 90-degree rotation, rather than entering 90.
Angle value | Clockwise rotation |
|---|---|
0 | 0° (no rotation) |
1 | 90° |
2 | 180° |
3 | 270° |
Direct API example: rotate a QR code by 90 degrees
Send the following JSON body with your API key in the x-api-key header and Content-Type: application/json:
{
"type": "QRCode",
"value": "PDF.co rotation example",
"name": "rotated-qr.png",
"profiles": "{\"Angle\":1}"
}The profiles value above is a JSON-encoded string. Preserve the capital A in Angle.
Entering the profile in a dedicated Profiles field
When your integration provides a dedicated Profiles or Custom Profiles field, enter the profile JSON itself:
{
"Angle": 1
}See the Barcode Generator documentation and Profiles guide for more details.