> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Download QR Code (Printable)

> Generate a print-optimized QR Code in black and white for professional printing. This endpoint ensures only black ink (CMYK: 0) is used, reducing printing costs and maintaining maximum scan contrast. Authentication required.

## Description

This endpoint generates a **high-quality, print-ready QR Code** in **PDF format**, specifically designed for offset or laser printing.\
The output file is optimized for grayscale printing with strict CMYK color control (black only).

## Request Parameters

### Form Data (multipart/form-data)

| Name        | Type     | Required | Description                                                 |
| :---------- | :------- | :------- | :---------------------------------------------------------- |
| `qrid`      | `string` | ✅        | Unique QR Code ID (e.g., `Q184ebe392f46414a`)               |
| `for_print` | `string` | ✅        | Must be set to `'true'` to enable printable mode            |
| `name`      | `string` | No       | Output filename for the downloaded PDF (e.g., `qrCode.pdf`) |
| `size`      | `string` | No       | QR code size in pixels (range **300–600px**, default `600`) |

## Notes

* The generated QR Code is **vector-based (PDF)** — ideal for professional printing.
* All colors are automatically converted to **pure black (K:100)** for print efficiency.
* The endpoint **ignores any existing design styles** — the QR is output in plain black and white for best scannability.
* **Minimum size**: 300 pixels; **Maximum size**: 600 pixels
* **Default size**: **600×600 pixels.**
* File output type: `application/pdf`.Request Body (Form Data)

## Examples

### Download Printable QR Code (Default Size)

```bash theme={null}
curl -X POST "https://management.scanova.io/qr/download/" \
  -H "Authorization: YOUR_API_KEY" \
  -F "qrid=Q184ebe392f46414a" \
  -F "for_print=true" \
  -F "name=qrCode.pdf"
```

### Download Printable QR Code (Custom Size)

```bash theme={null}
# Download 400px printable QR code
curl -X POST "https://management.scanova.io/qr/download/" \
  -H "Authorization: YOUR_API_KEY" \
  -F "qrid=Q184ebe392f46414a" \
  -F "for_print=true" \
  -F "size=400" \
  -F "name=qrCode-400px.pdf"

# Download 300px printable QR code
curl -X POST "https://management.scanova.io/qr/download/" \
  -H "Authorization: YOUR_API_KEY" \
  -F "qrid=Q184ebe392f46414a" \
  -F "for_print=true" \
  -F "size=300" \
  -F "name=qrCode-300px.pdf"
```

### Download with Different File Names

```bash theme={null}
# Business card QR code
curl -X POST "https://management.scanova.io/qr/download/" \
  -H "Authorization: YOUR_API_KEY" \
  -F "qrid=Q184ebe392f46414a" \
  -F "for_print=true" \
  -F "size=300" \
  -F "name=business-card-qr.pdf"

# Poster QR code
curl -X POST "https://management.scanova.io/qr/download/" \
  -H "Authorization: YOUR_API_KEY" \
  -F "qrid=Q184ebe392f46414a" \
  -F "for_print=true" \
  -F "size=600" \
  -F "name=poster-qr.pdf"
```

## Error Handling

### **Invalid Size Parameter**

If the size parameter is outside the allowed range (300-600), the API will return an error:

```json theme={null}
{
  "error": "Invalid size parameter",
  "message": "Size must be between 300 and 600 pixels for printable format"
}
```

### **QR Code Not Found**

If the QR code ID doesn't exist:

```json theme={null}
{
  "error": "Not found",
  "message": "QR code not found"
}
```

### **Missing Required Parameters**

If `for_print` is not set to "true":

```json theme={null}
{
  "error": "Invalid parameter",
  "message": "for_print must be set to true for printable format"
}
```

## Best Practices

* ✅ Use `for_print=true` only when generating files for **offset or large-format printing**.
* ✅ Maintain **high resolution (≥400px)** for print clarity.
* ⚠️ Avoid applying design layers or colors — print mode always outputs black-only QR codes.
* 💡 Include the `name` parameter to generate descriptive filenames for easy organization (e.g., `event-qr-print.pdf`).
* 🔒 Store API keys securely and restrict access to authorized systems only.

### When to Use: Printable vs Standard Download

* Use `Standard` for **digital** applications where colors, frames, or logos are needed.
* Use `Printable` when you need a **print-ready, high-contrast, black-only** QR code for **professional printing**.


## OpenAPI

````yaml POST /qr/download/
openapi: 3.1.0
info:
  title: Scanova QR Code API
  description: QR Code management endpoints for creating, updating, and managing QR codes
  version: 1.0.0
servers:
  - url: https://management.scanova.io
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /qr/download/:
    post:
      tags:
        - QR Code
      summary: Download QR Code (Printable)
      description: >-
        Downloads a QR code in printable format optimized for professional
        printing. Generates black and white QR codes with CMYK values set to 0,
        ensuring only black ink is used for cost-effective printing. Requires
        authentication.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - qrid
                - for_print
              properties:
                qrid:
                  type: string
                  description: QR code ID
                  example: Q184ebe392f46414a
                name:
                  type: string
                  description: Name for the downloaded file
                  example: qrCode.pdf
                for_print:
                  type: string
                  description: Must be set to 'true' for printable format
                  enum:
                    - 'true'
                  example: 'true'
                size:
                  type: string
                  description: Size of the QR code in pixels (300-600px)
                  pattern: ^[3-6][0-9]{2}$
                  example: '600'
            examples:
              default_size:
                summary: Download with default size (600px)
                value:
                  qrid: Q184ebe392f46414a
                  for_print: 'true'
                  name: qrCode.pdf
              custom_size:
                summary: Download with custom size
                value:
                  qrid: Q184ebe392f46414a
                  for_print: 'true'
                  size: '400'
                  name: qrCode-400px.pdf
              business_card:
                summary: Business card QR code
                value:
                  qrid: Q184ebe392f46414a
                  for_print: 'true'
                  size: '300'
                  name: business-card-qr.pdf
      responses:
        '200':
          description: Printable QR code PDF file
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid size parameter
                  message:
                    type: string
                    example: >-
                      Size must be between 300 and 600 pixels for printable
                      format
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorResponse'
        '404':
          description: QR Code not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Not found
                  message:
                    type: string
                    example: QR code not found
      security:
        - apiKeyAuth: []
components:
  schemas:
    AuthenticationErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Authentication error message
          example: Invalid token.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Enter your API key directly in the Authorization
        header.

````