QR Styled Node
AI-generatedOverview
This node generates QR codes with customizable styles and branding options. It supports various output formats (SVG, PNG, JPEG, WebP) and allows embedding logos from URLs or binary data. Users can customize QR code size, shape, dot styles, corner styles, colors, gradients, error correction levels, margins, and background options. The node is useful for creating visually appealing QR codes for marketing, branding, or information sharing purposes.
Use Case Examples
- Generate a QR code with a company logo embedded from a URL, customized dot and corner styles, and output as PNG for use in marketing materials.
- Create a QR code with a transparent background and gradient-colored dots in SVG format for embedding in a website.
- Produce a QR code with a binary image logo from a previous node, customized error correction level, and output as WebP for efficient storage.
Properties
| Name | Meaning |
|---|---|
| Data | The data to encode in the QR code, required input string. |
| QR Code Size | Width and height of the QR code in pixels. |
| Shape | The shape of the QR code, either square or circle (circle adds random extra dots around). |
| Output Format | Output format for the QR code image, supporting SVG, PNG, JPEG, and WebP formats. |
| Logo Image Source | Source of the logo image to embed in the QR code, can be none, URL, or binary data from a previous node. |
| Logo Image URL | URL of the logo image to embed in the QR code, shown only if logo image source is URL. |
| Input Binary Field | Name of the binary property containing the image data, shown only if logo image source is binary. |
| Dots Type | Style of QR code dots. |
| Corner Square Type | Style of corner squares (detection patterns). |
| Corner Dot Type | Style of corner dots (inside detection patterns). |
| Advanced Dots Options | Advanced customization options for QR code dots including color, gradients, rounding, and gradient usage. |
| Advanced QR Options | Advanced QR code configuration options including error correction level, margin, version, and encoding mode. |
| Background Options | Customization options for the QR code background including color, gradients, transparency, and gradient usage. |
| Advanced Corner Square Options | Advanced customization for corner squares including color, gradients, and gradient usage. |
| Advanced Corner Dot Options | Advanced customization for corner dots including color, gradients, and gradient usage. |
| Advanced Image Options | Advanced options for the embedded logo/image including hiding background dots, image size, margin, and cross-origin settings. |
Output
Binary
Contains the generated QR code image data in the specified format with metadata such as mimeType, fileName, and fileExtension.
JSON
data- The original data encoded in the QR code.qrCodeBase64- Base64-encoded string of the generated QR code image with data URI prefix.qrCodeSize- Size of the generated QR code in pixels.outputFormat- Format of the generated QR code image (svg, png, jpeg, webp).requestedFormat- Requested output format for the QR code image.generatedAt- Timestamp when the QR code was generated.filename- Filename of the generated QR code image.warning- Optional warning messages related to generation issues, e.g., transparency with JPEG.
Dependencies
- qr-code-styling package
- jsdom package
- sharp package
- canvas package (optional for image embedding)
Troubleshooting
- Missing required dependencies: qr-code-styling, jsdom, sharp, and canvas. Install them using npm install qr-code-styling jsdom sharp canvas.
- Invalid or missing data parameter will cause the node to throw an error.
- Invalid logo image URL or unsupported image type will generate the QR code without the logo and issue a warning.
- Binary image data not found or invalid will generate the QR code without the logo and issue a warning.
- Transparency requested with JPEG format will fallback to white background with a warning.
- QR code generation timeout after 30 seconds will throw an error.