Action that generates and reads QR codes Supports generating QR codes from text/URLs and reading QR codes from base64 images

Example

// Generate QR code
await runAction({
ActionName: 'QR Code',
Params: [{
Name: 'Operation',
Value: 'generate'
}, {
Name: 'Data',
Value: 'https://example.com'
}]
});

// Generate QR code with custom options
await runAction({
ActionName: 'QR Code',
Params: [{
Name: 'Operation',
Value: 'generate'
}, {
Name: 'Data',
Value: 'Contact: John Doe\nPhone: +1-555-123-4567\nEmail: john@example.com'
}, {
Name: 'Size',
Value: 300
}, {
Name: 'ErrorCorrection',
Value: 'H'
}]
});

Hierarchy (view full)

Constructors

Methods

  • Executes QR code generation or reading operation

    Parameters

    • params: RunActionParams<any>

      The action parameters containing:

      • Operation: 'generate' or 'read'
      • Data: Text/URL to encode (for generate) or base64 image data (for read)
      • Size: QR code size in pixels (default: 200, max: 1000) [generate only]
      • ErrorCorrection: Error correction level 'L', 'M', 'Q', 'H' (default: 'M') [generate only]
      • Margin: Quiet zone margin (default: 4) [generate only]
      • DarkColor: Dark module color (default: '#000000') [generate only]
      • LightColor: Light module color (default: '#FFFFFF') [generate only]

    Returns Promise<ActionResultSimple>

    QR code generation/reading results

  • Executes the action with the provided parameters.

    Parameters

    • params: RunActionParams<any>

      The action execution parameters including context

    Returns Promise<ActionResultSimple>

    Promise resolving to the action result

  • Generates SVG representation of QR code

    Parameters

    • matrix: number[][]
    • size: number
    • margin: number
    • darkColor: string
    • lightColor: string

    Returns string