Configuration-settings.md.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. # Configuration settings
  2. <!-- This file is auto generated from the source of QROptionsTrait.php -->
  3. ## version
  4. QR Code version number
  5. `1 ... 40` or `Version::AUTO` (default)
  6. **See also:**
  7. - `\chillerlan\QRCode\Common\Version`
  8. ## versionMin
  9. Minimum QR version
  10. if `QROptions::$version` is set to `Version::AUTO` (default: 1)
  11. ## versionMax
  12. Maximum QR version
  13. if `QROptions::$version` is set to `Version::AUTO` (default: 40)
  14. ## eccLevel
  15. Error correct level
  16. `EccLevel::X` where `X` is:
  17. - `L` => 7% (default)
  18. - `M` => 15%
  19. - `Q` => 25%
  20. - `H` => 30%
  21. **See also:**
  22. - `\chillerlan\QRCode\Common\EccLevel`
  23. - [github.com/chillerlan/php-qrcode/discussions/160](https://github.com/chillerlan/php-qrcode/discussions/160)
  24. ## maskPattern
  25. Mask Pattern to use (no value in using, mostly for unit testing purposes)
  26. `0 ... 7` or `MaskPattern::PATTERN_AUTO` (default)
  27. **See also:**
  28. - `\chillerlan\QRCode\Common\MaskPattern`
  29. ## addQuietzone
  30. Add a "quiet zone" (margin) according to the QR code spec
  31. **See also:**
  32. - [www.qrcode.com/en/howto/code.html](https://www.qrcode.com/en/howto/code.html)
  33. ## quietzoneSize
  34. Size of the quiet zone
  35. internally clamped to `0 ... $moduleCount / 2` (default: 4)
  36. ## outputType
  37. The built-in output type
  38. - `QROutputInterface::MARKUP_SVG` (default)
  39. - `QROutputInterface::MARKUP_HTML`
  40. - `QROutputInterface::GDIMAGE_BMP`
  41. - `QROutputInterface::GDIMAGE_GIF`
  42. - `QROutputInterface::GDIMAGE_JPG`
  43. - `QROutputInterface::GDIMAGE_PNG`
  44. - `QROutputInterface::GDIMAGE_WEBP`
  45. - `QROutputInterface::STRING_TEXT`
  46. - `QROutputInterface::STRING_JSON`
  47. - `QROutputInterface::IMAGICK`
  48. - `QROutputInterface::EPS`
  49. - `QROutputInterface::FPDF`
  50. - `QROutputInterface::CUSTOM`
  51. **Deprecated:** 5.0.0 see issue #223
  52. **See also:**
  53. - `\chillerlan\QRCode\Output\QREps`
  54. - `\chillerlan\QRCode\Output\QRFpdf`
  55. - `\chillerlan\QRCode\Output\QRGdImage`
  56. - `\chillerlan\QRCode\Output\QRImagick`
  57. - `\chillerlan\QRCode\Output\QRMarkupHTML`
  58. - `\chillerlan\QRCode\Output\QRMarkupSVG`
  59. - `\chillerlan\QRCode\Output\QRString`
  60. - [github.com/chillerlan/php-qrcode/issues/223](https://github.com/chillerlan/php-qrcode/issues/223)
  61. ## outputInterface
  62. The FQCN of the custom `QROutputInterface`
  63. if `QROptions::$outputType` is set to `QROutputInterface::CUSTOM` (default: `null`)
  64. **Deprecated:** 5.0.0 the nullable type will be removed in future versions
  65. and the default value will be set to `QRMarkupSVG::class`
  66. ## returnResource
  67. Return the image resource instead of a render if applicable.
  68. - `QRGdImage`: `resource` (PHP < 8), `GdImage`
  69. - `QRImagick`: `Imagick`
  70. - `QRFpdf`: `FPDF`
  71. This option overrides/ignores other output settings, such as `QROptions::$cachefile`
  72. and `QROptions::$outputBase64`. (default: `false`)
  73. **See also:**
  74. - `\chillerlan\QRCode\Output\QROutputInterface::dump()`
  75. ## cachefile
  76. Optional cache file path `/path/to/cache.file`
  77. Please note that the `$file` parameter in `QRCode::render()` and `QRCode::renderMatrix()`
  78. takes precedence over the `QROptions::$cachefile` value. (default: `null`)
  79. **See also:**
  80. - `\chillerlan\QRCode\QRCode::render()`
  81. - `\chillerlan\QRCode\QRCode::renderMatrix()`
  82. ## outputBase64
  83. Toggle base64 data URI or raw data output (if applicable)
  84. (default: `true`)
  85. **See also:**
  86. - `\chillerlan\QRCode\Output\QROutputAbstract::toBase64DataURI()`
  87. ## eol
  88. Newline string
  89. (default: `PHP_EOL`)
  90. ## bgColor
  91. Sets the image background color (if applicable)
  92. - `QRImagick`: defaults to `"white"`
  93. - `QRGdImage`: defaults to `[255, 255, 255]`
  94. - `QRFpdf`: defaults to blank internally (white page)
  95. ## invertMatrix
  96. Whether to invert the matrix (reflectance reversal)
  97. (default: `false`)
  98. **See also:**
  99. - `\chillerlan\QRCode\Data\QRMatrix::invert()`
  100. ## drawLightModules
  101. Whether to draw the light (false) modules
  102. (default: `true`)
  103. ## drawCircularModules
  104. Specify whether to draw the modules as filled circles
  105. a note for `GdImage` output:
  106. if `QROptions::$scale` is less than 20, the image will be upscaled internally, then the modules will be drawn
  107. using `imagefilledellipse()` and then scaled back to the expected size
  108. No effect in: `QREps`, `QRFpdf`, `QRMarkupHTML`
  109. **See also:**
  110. - [php.net: `\imagefilledellipse()`](https://www.php.net/manual/function.imagefilledellipse)
  111. - [github.com/chillerlan/php-qrcode/issues/23](https://github.com/chillerlan/php-qrcode/issues/23)
  112. - [github.com/chillerlan/php-qrcode/discussions/122](https://github.com/chillerlan/php-qrcode/discussions/122)
  113. ## circleRadius
  114. Specifies the radius of the modules when `QROptions::$drawCircularModules` is set to `true`
  115. (default: 0.45)
  116. ## keepAsSquare
  117. Specifies which module types to exclude when `QROptions::$drawCircularModules` is set to `true`
  118. (default: `[]`)
  119. ## connectPaths
  120. Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc.
  121. **See also:**
  122. - [github.com/chillerlan/php-qrcode/issues/57](https://github.com/chillerlan/php-qrcode/issues/57)
  123. ## excludeFromConnect
  124. Specify which paths/patterns to exclude from connecting if `QROptions::$connectPaths` is set to `true`
  125. ## moduleValues
  126. Module values map
  127. - `QRImagick`, `QRMarkupHTML`, `QRMarkupSVG`: #ABCDEF, cssname, rgb(), rgba()...
  128. - `QREps`, `QRFpdf`, `QRGdImage`: `[R, G, B]` // 0-255
  129. - `QREps`: `[C, M, Y, K]` // 0-255
  130. **See also:**
  131. - `\chillerlan\QRCode\Output\QROutputAbstract::setModuleValues()`
  132. ## addLogoSpace
  133. Toggles logo space creation
  134. **See also:**
  135. - `\chillerlan\QRCode\QRCode::addMatrixModifications()`
  136. - `\chillerlan\QRCode\Data\QRMatrix::setLogoSpace()`
  137. ## logoSpaceWidth
  138. Width of the logo space
  139. if only `QROptions::$logoSpaceWidth` is given, the logo space is assumed a square of that size
  140. ## logoSpaceHeight
  141. Height of the logo space
  142. if only `QROptions::$logoSpaceHeight` is given, the logo space is assumed a square of that size
  143. ## logoSpaceStartX
  144. Optional horizontal start position of the logo space (top left corner)
  145. ## logoSpaceStartY
  146. Optional vertical start position of the logo space (top left corner)
  147. ## scale
  148. Pixel size of a QR code module
  149. ## imageTransparent
  150. Toggle transparency
  151. - `QRGdImage` and `QRImagick`: the given `QROptions::$transparencyColor` is set as transparent
  152. **See also:**
  153. - [github.com/chillerlan/php-qrcode/discussions/121](https://github.com/chillerlan/php-qrcode/discussions/121)
  154. ## transparencyColor
  155. Sets a transparency color for when `QROptions::$imageTransparent` is set to `true`.
  156. Defaults to `QROptions::$bgColor`.
  157. - `QRGdImage`: `[R, G, B]`, this color is set as transparent in `imagecolortransparent()`
  158. - `QRImagick`: `"color_str"`, this color is set in `Imagick::transparentPaintImage()`
  159. **See also:**
  160. - [php.net: `\imagecolortransparent()`](https://www.php.net/manual/function.imagecolortransparent)
  161. - [php.net: `\Imagick::transparentPaintImage()`](https://www.php.net/manual/imagick.transparentpaintimage)
  162. ## quality
  163. Compression quality
  164. The given value depends on the used output type:
  165. - `QRGdImageBMP`: `[0...1]`
  166. - `QRGdImageJPEG`: `[0...100]`
  167. - `QRGdImageWEBP`: `[0...9]`
  168. - `QRGdImagePNG`: `[0...100]`
  169. - `QRImagick`: `[0...100]`
  170. **See also:**
  171. - [php.net: `\imagebmp()`](https://www.php.net/manual/function.imagebmp)
  172. - [php.net: `\imagejpeg()`](https://www.php.net/manual/function.imagejpeg)
  173. - [php.net: `\imagepng()`](https://www.php.net/manual/function.imagepng)
  174. - [php.net: `\imagewebp()`](https://www.php.net/manual/function.imagewebp)
  175. - [php.net: `\Imagick::setImageCompressionQuality()`](https://www.php.net/manual/imagick.setimagecompressionquality)
  176. ## gdImageUseUpscale
  177. Toggles the usage of internal upscaling when `QROptions::$drawCircularModules` is set to `true` and
  178. `QROptions::$scale` is less than 20
  179. **See also:**
  180. - `\chillerlan\QRCode\Output\QRGdImage::createImage()`
  181. - [github.com/chillerlan/php-qrcode/issues/23](https://github.com/chillerlan/php-qrcode/issues/23)
  182. ## imagickFormat
  183. Imagick output format
  184. **See also:**
  185. - [php.net: `\Imagick::setImageFormat()`](https://www.php.net/manual/imagick.setimageformat)
  186. - [www.imagemagick.org/script/formats.php](https://www.imagemagick.org/script/formats.php)
  187. ## cssClass
  188. A common css class
  189. ## svgAddXmlHeader
  190. Whether to add an XML header line or not, e.g. to embed the SVG directly in HTML
  191. `<?xml version="1.0" encoding="UTF-8"?>`
  192. ## svgDefs
  193. Anything in the SVG `<defs>` tag
  194. **See also:**
  195. - [developer.mozilla.org/en-US/docs/Web/SVG/Element/defs](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs)
  196. ## svgPreserveAspectRatio
  197. Sets the value for the "preserveAspectRatio" on the `<svg>` element
  198. **See also:**
  199. - [developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio)
  200. ## svgUseFillAttributes
  201. Whether to use the SVG `fill` attributes
  202. If set to `true` (default), the `fill` attribute will be set with the module value for the `<path>` element's `$M_TYPE`.
  203. When set to `false`, the module values map will be ignored and the QR Code may be styled via CSS.
  204. **See also:**
  205. - [developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill)
  206. ## textLineStart
  207. An optional line prefix, e.g. empty space to align the QR Code in a console
  208. ## jsonFlags
  209. Sets the flags to use for the `json_encode()` call
  210. **See also:**
  211. - [www.php.net/manual/json.constants.php](https://www.php.net/manual/json.constants.php)
  212. ## jsonAsBooleans
  213. Whether to return matrix values in JSON as booleans or `$M_TYPE` integers
  214. ## fpdfMeasureUnit
  215. Measurement unit for `FPDF` output: `pt`, `mm`, `cm`, `in` (default: `pt`)
  216. **See also:**
  217. - `FPDF::__construct()`
  218. ## readerUseImagickIfAvailable
  219. Use Imagick (if available) when reading QR Codes
  220. ## readerGrayscale
  221. Grayscale the image before reading
  222. ## readerInvertColors
  223. Invert the colors of the image
  224. ## readerIncreaseContrast
  225. Increase the contrast before reading
  226. note that applying contrast works different in GD and Imagick, so mileage may vary
  227. ## imageBase64
  228. **Deprecated:** 5.0.0 use QROptions::$outputBase64 instead
  229. **See also:**
  230. - ` \chillerlan\QRCode\QROptions::$outputBase64`
  231. ## jpegQuality
  232. **Deprecated:** 5.0.0 use QROptions::$quality instead
  233. **See also:**
  234. - ` \chillerlan\QRCode\QROptions::$quality`
  235. ## pngCompression
  236. **Deprecated:** 5.0.0 use QROptions::$quality instead
  237. **See also:**
  238. - ` \chillerlan\QRCode\QROptions::$quality`
  239. ## imageTransparencyBG
  240. **Deprecated:** 5.0.0 use QROptions::$transparencyColor instead
  241. **See also:**
  242. - ` \chillerlan\QRCode\QROptions::$transparencyColor`
  243. ## imagickBG
  244. **Deprecated:** 5.0.0 use QROptions::$bgColor instead
  245. **See also:**
  246. - ` \chillerlan\QRCode\QROptions::$bgColor`