Configuration-settings.md.txt 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  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. **See also:**
  52. - `\chillerlan\QRCode\Output\QREps`
  53. - `\chillerlan\QRCode\Output\QRFpdf`
  54. - `\chillerlan\QRCode\Output\QRGdImage`
  55. - `\chillerlan\QRCode\Output\QRImagick`
  56. - `\chillerlan\QRCode\Output\QRMarkupHTML`
  57. - `\chillerlan\QRCode\Output\QRMarkupSVG`
  58. - `\chillerlan\QRCode\Output\QRString`
  59. ## outputInterface
  60. The FQCN of the custom `QROutputInterface`
  61. if `QROptions::$outputType` is set to `QROutputInterface::CUSTOM` (default: `null`)
  62. ## returnResource
  63. Return the image resource instead of a render if applicable.
  64. - `QRGdImage`: `resource` (PHP < 8), `GdImage`
  65. - `QRImagick`: `Imagick`
  66. - `QRFpdf`: `FPDF`
  67. This option overrides/ignores other output settings, such as `QROptions::$cachefile`
  68. and `QROptions::$outputBase64`. (default: `false`)
  69. **See also:**
  70. - `\chillerlan\QRCode\Output\QROutputInterface::dump()`
  71. ## cachefile
  72. Optional cache file path `/path/to/cache.file`
  73. Please note that the `$file` parameter in `QRCode::render()` and `QRCode::renderMatrix()`
  74. takes precedence over the `QROptions::$cachefile` value. (default: `null`)
  75. **See also:**
  76. - `\chillerlan\QRCode\QRCode::render()`
  77. - `\chillerlan\QRCode\QRCode::renderMatrix()`
  78. ## outputBase64
  79. Toggle base64 data URI or raw data output (if applicable)
  80. (default: `true`)
  81. **See also:**
  82. - `\chillerlan\QRCode\Output\QROutputAbstract::toBase64DataURI()`
  83. ## eol
  84. Newline string
  85. (default: `PHP_EOL`)
  86. ## bgColor
  87. Sets the image background color (if applicable)
  88. - `QRImagick`: defaults to `"white"`
  89. - `QRGdImage`: defaults to `[255, 255, 255]`
  90. - `QRFpdf`: defaults to blank internally (white page)
  91. ## invertMatrix
  92. Whether to invert the matrix (reflectance reversal)
  93. (default: `false`)
  94. **See also:**
  95. - `\chillerlan\QRCode\Data\QRMatrix::invert()`
  96. ## drawLightModules
  97. Whether to draw the light (false) modules
  98. (default: `true`)
  99. ## drawCircularModules
  100. Specify whether to draw the modules as filled circles
  101. a note for `GdImage` output:
  102. if `QROptions::$scale` is less than 20, the image will be upscaled internally, then the modules will be drawn
  103. using `imagefilledellipse()` and then scaled back to the expected size
  104. No effect in: `QREps`, `QRFpdf`, `QRMarkupHTML`
  105. **See also:**
  106. - [php.net: `\imagefilledellipse()`](https://www.php.net/manual/function.imagefilledellipse)
  107. - [github.com/chillerlan/php-qrcode/issues/23](https://github.com/chillerlan/php-qrcode/issues/23)
  108. - [github.com/chillerlan/php-qrcode/discussions/122](https://github.com/chillerlan/php-qrcode/discussions/122)
  109. ## circleRadius
  110. Specifies the radius of the modules when `QROptions::$drawCircularModules` is set to `true`
  111. (default: 0.45)
  112. ## keepAsSquare
  113. Specifies which module types to exclude when `QROptions::$drawCircularModules` is set to `true`
  114. (default: `[]`)
  115. ## connectPaths
  116. Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc.
  117. **See also:**
  118. - [github.com/chillerlan/php-qrcode/issues/57](https://github.com/chillerlan/php-qrcode/issues/57)
  119. ## excludeFromConnect
  120. Specify which paths/patterns to exclude from connecting if `QROptions::$connectPaths` is set to `true`
  121. ## moduleValues
  122. Module values map
  123. - `QRImagick`, `QRMarkupHTML`, `QRMarkupSVG`: #ABCDEF, cssname, rgb(), rgba()...
  124. - `QREps`, `QRFpdf`, `QRGdImage`: `[R, G, B]` // 0-255
  125. - `QREps`: `[C, M, Y, K]` // 0-255
  126. **See also:**
  127. - `\chillerlan\QRCode\Output\QROutputAbstract::setModuleValues()`
  128. ## addLogoSpace
  129. Toggles logo space creation
  130. **See also:**
  131. - `\chillerlan\QRCode\QRCode::addMatrixModifications()`
  132. - `\chillerlan\QRCode\Data\QRMatrix::setLogoSpace()`
  133. ## logoSpaceWidth
  134. Width of the logo space
  135. if only `QROptions::$logoSpaceWidth` is given, the logo space is assumed a square of that size
  136. ## logoSpaceHeight
  137. Height of the logo space
  138. if only `QROptions::$logoSpaceHeight` is given, the logo space is assumed a square of that size
  139. ## logoSpaceStartX
  140. Optional horizontal start position of the logo space (top left corner)
  141. ## logoSpaceStartY
  142. Optional vertical start position of the logo space (top left corner)
  143. ## scale
  144. Pixel size of a QR code module
  145. ## imageTransparent
  146. Toggle transparency
  147. - `QRGdImage` and `QRImagick`: the given `QROptions::$transparencyColor` is set as transparent
  148. **See also:**
  149. - [github.com/chillerlan/php-qrcode/discussions/121](https://github.com/chillerlan/php-qrcode/discussions/121)
  150. ## transparencyColor
  151. Sets a transparency color for when `QROptions::$imageTransparent` is set to `true`.
  152. Defaults to `QROptions::$bgColor`.
  153. - `QRGdImage`: `[R, G, B]`, this color is set as transparent in `imagecolortransparent()`
  154. - `QRImagick`: `"color_str"`, this color is set in `Imagick::transparentPaintImage()`
  155. **See also:**
  156. - [php.net: `\imagecolortransparent()`](https://www.php.net/manual/function.imagecolortransparent)
  157. - [php.net: `\Imagick::transparentPaintImage()`](https://www.php.net/manual/imagick.transparentpaintimage)
  158. ## quality
  159. Compression quality
  160. The given value depends on the used output type:
  161. - `QROutputInterface::GDIMAGE_BMP`: `[0...1]`
  162. - `QROutputInterface::GDIMAGE_JPG`: `[0...100]`
  163. - `QROutputInterface::GDIMAGE_WEBP`: `[0...9]`
  164. - `QROutputInterface::GDIMAGE_PNG`: `[0...100]`
  165. - `QROutputInterface::IMAGICK`: `[0...100]`
  166. **See also:**
  167. - [php.net: `\imagebmp()`](https://www.php.net/manual/function.imagebmp)
  168. - [php.net: `\imagejpeg()`](https://www.php.net/manual/function.imagejpeg)
  169. - [php.net: `\imagepng()`](https://www.php.net/manual/function.imagepng)
  170. - [php.net: `\imagewebp()`](https://www.php.net/manual/function.imagewebp)
  171. - [php.net: `\Imagick::setImageCompressionQuality()`](https://www.php.net/manual/imagick.setimagecompressionquality)
  172. ## imagickFormat
  173. Imagick output format
  174. **See also:**
  175. - [php.net: `\Imagick::setImageFormat()`](https://www.php.net/manual/imagick.setimageformat)
  176. - [www.imagemagick.org/script/formats.php](https://www.imagemagick.org/script/formats.php)
  177. ## cssClass
  178. A common css class
  179. ## markupDark
  180. Markup substitute for dark (CSS value)
  181. ## markupLight
  182. Markup substitute for light (CSS value)
  183. ## svgAddXmlHeader
  184. Whether to add an XML header line or not, e.g. to embed the SVG directly in HTML
  185. `<?xml version="1.0" encoding="UTF-8"?>`
  186. ## svgOpacity
  187. SVG path opacity
  188. Sets the value for the SVG "fill-opacity" on a `<path>` element. Only in effect when non-empty values
  189. for `QROptions::$markupDark` and `QROptions::$markupLight` are given.
  190. The opacity value is the same for all paths - please use CSS for more sophisticated implementations.
  191. ## svgDefs
  192. Anything in the SVG `<defs>` tag
  193. **See also:**
  194. - [developer.mozilla.org/en-US/docs/Web/SVG/Element/defs](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs)
  195. ## svgPreserveAspectRatio
  196. Sets the value for the "preserveAspectRatio" on the `<svg>` element
  197. **See also:**
  198. - [developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio)
  199. ## textDark
  200. String substitute for dark
  201. **See also:**
  202. - [en.wikipedia.org/wiki/Block_Elements](https://en.wikipedia.org/wiki/Block_Elements)
  203. - [en.wikipedia.org/wiki/ANSI_escape_code#8-bit](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit)
  204. ## textLight
  205. String substitute for light
  206. ## textLineStart
  207. An optional line prefix, e.g. empty space to align the QR Code in a console
  208. ## jsonAsBooleans
  209. Whether to return matrix values in JSON as booleans or `$M_TYPE` integers
  210. ## fpdfMeasureUnit
  211. Measurement unit for `FPDF` output: `pt`, `mm`, `cm`, `in` (default: `pt`)
  212. **See also:**
  213. - `FPDF::__construct()`
  214. ## readerUseImagickIfAvailable
  215. Use Imagick (if available) when reading QR Codes
  216. ## readerGrayscale
  217. Grayscale the image before reading
  218. ## readerIncreaseContrast
  219. Increase the contrast before reading
  220. note that applying contrast works different in GD and Imagick, so mileage may vary