generate_svg: Generate the QR code as an svg file

Description Usage Arguments Value

View source: R/generate_svg.R

Description

Create the QR code using qrcode_gen() and save it as an svg file.

Usage

1
2
3
4
5
6
7
8
9
generate_svg(
  string,
  filename,
  size = 100,
  foreground = "black",
  background = "white",
  show = interactive(),
  error_correction = c("L", "M", "H", "Q")
)

Arguments

string

Input string for the QR code. Passed to dataString of qrcode_gen().

filename

Where to store the filename. Silently overwrites existings files. Tries to create the path, when it doesn't exist.

size

size of the svg file in pixels.

foreground

Stroke and fill colour for the foreground. Use a valid CSS color. Default to "black".

background

Fill colour for the background. Use a valid CSS color. Default to "white".

show

Open the file after creating it. Defaults to TRUE on interactive() sessions, otherwise FALSE.

error_correction

Required error correction level. Passed to ErrorCorrectionLevel of qrcode_gen().

Value

invisible NULL


qrcode documentation built on July 2, 2021, 5:06 p.m.