Configuration-settings.html 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <!DOCTYPE html>
  2. <html class="writer-html5" lang="en" >
  3. <head>
  4. <meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>Configuration settings &mdash; PHP-QRCode main
  7. Manual</title>
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  10. <!--[if lt IE 9]>
  11. <script src="../_static/js/html5shiv.min.js"></script>
  12. <![endif]-->
  13. <script src="../_static/jquery.js?v=5d32c60e"></script>
  14. <script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
  15. <script src="../_static/documentation_options.js?v=a8da1a53"></script>
  16. <script src="../_static/doctools.js?v=888ff710"></script>
  17. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  18. <script src="../_static/js/theme.js"></script>
  19. <link rel="index" title="Index" href="../genindex.html" />
  20. <link rel="search" title="Search" href="../search.html" />
  21. <link rel="next" title="Module values" href="../Customizing/Module-Values.html" />
  22. <link rel="prev" title="Advanced usage" href="Advanced-usage.html" />
  23. </head>
  24. <body class="wy-body-for-nav">
  25. <div class="wy-grid-for-nav">
  26. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  27. <div class="wy-side-scroll">
  28. <div class="wy-side-nav-search" >
  29. <a href="../index.html" class="icon icon-home">
  30. PHP-QRCode
  31. </a>
  32. <div role="search">
  33. <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
  34. <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
  35. <input type="hidden" name="check_keywords" value="yes" />
  36. <input type="hidden" name="area" value="default" />
  37. </form>
  38. </div>
  39. </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
  40. <p class="caption" role="heading"><span class="caption-text">Usage</span></p>
  41. <ul class="current">
  42. <li class="toctree-l1"><a class="reference internal" href="Overview.html">Overview</a><ul>
  43. <li class="toctree-l2"><a class="reference internal" href="Overview.html#features">Features</a></li>
  44. <li class="toctree-l2"><a class="reference internal" href="Overview.html#requirements">Requirements</a></li>
  45. <li class="toctree-l2"><a class="reference internal" href="Overview.html#framework-integration">Framework Integration</a></li>
  46. <li class="toctree-l2"><a class="reference internal" href="Overview.html#shameless-advertising">Shameless advertising</a></li>
  47. </ul>
  48. </li>
  49. <li class="toctree-l1"><a class="reference internal" href="Installation.html">Installation</a><ul>
  50. <li class="toctree-l2"><a class="reference internal" href="Installation.html#installation-with-composer">Installation with Composer</a><ul>
  51. <li class="toctree-l3"><a class="reference internal" href="Installation.html#composer-json">composer.json</a><ul>
  52. <li class="toctree-l4"><a class="reference internal" href="Installation.html#version-switch">Version switch</a></li>
  53. </ul>
  54. </li>
  55. <li class="toctree-l3"><a class="reference internal" href="Installation.html#terminal">Terminal</a></li>
  56. </ul>
  57. </li>
  58. <li class="toctree-l2"><a class="reference internal" href="Installation.html#manual-installation">Manual installation</a><ul>
  59. <li class="toctree-l3"><a class="reference internal" href="Installation.html#can-i-use-this-library-without-using-composer">Can i use this library without using composer?</a></li>
  60. </ul>
  61. </li>
  62. <li class="toctree-l2"><a class="reference internal" href="Installation.html#supported-php-versions-extension-requirements">Supported PHP versions &amp; extension requirements</a></li>
  63. <li class="toctree-l2"><a class="reference internal" href="Installation.html#imagemagick">ImageMagick</a></li>
  64. </ul>
  65. </li>
  66. <li class="toctree-l1"><a class="reference internal" href="Quickstart.html">Quickstart</a><ul>
  67. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#import-the-library">Import the library</a></li>
  68. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#create-your-first-qr-code">Create your first QR Code</a><ul>
  69. <li class="toctree-l3"><a class="reference internal" href="Quickstart.html#configuration">Configuration</a></li>
  70. </ul>
  71. </li>
  72. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#reading-qr-codes">Reading QR Codes</a></li>
  73. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#notes">Notes</a></li>
  74. </ul>
  75. </li>
  76. <li class="toctree-l1"><a class="reference internal" href="Advanced-usage.html">Advanced usage</a><ul>
  77. <li class="toctree-l2"><a class="reference internal" href="Advanced-usage.html#configuration-via-qroptions">Configuration via <code class="docutils literal notranslate"><span class="pre">QROptions</span></code></a><ul>
  78. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#supply-an-iterable-of-options">Supply an <code class="docutils literal notranslate"><span class="pre">iterable</span></code> of options</a></li>
  79. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#load-and-save-options-from-to-json">Load and save options from/to JSON</a></li>
  80. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#extending-the-qroptions-class">Extending the <code class="docutils literal notranslate"><span class="pre">QROptions</span></code> class</a></li>
  81. </ul>
  82. </li>
  83. <li class="toctree-l2"><a class="reference internal" href="Advanced-usage.html#qrcode-methods"><code class="docutils literal notranslate"><span class="pre">QRCode</span></code> methods</a><ul>
  84. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#render-a-qrmatrix-instance">Render a <code class="docutils literal notranslate"><span class="pre">QRMatrix</span></code> instance</a></li>
  85. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#mixed-mode">Mixed mode</a></li>
  86. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#qr-code-reader">QR Code reader</a></li>
  87. </ul>
  88. </li>
  89. <li class="toctree-l2"><a class="reference internal" href="Advanced-usage.html#common-output-options">Common output options</a><ul>
  90. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#save-to-file">Save to file</a></li>
  91. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#base64-uri-output">Base64 URI output</a></li>
  92. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#return-the-image-resource">Return the image resource</a></li>
  93. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#add-a-logo-space">Add a logo space</a></li>
  94. </ul>
  95. </li>
  96. </ul>
  97. </li>
  98. <li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration settings</a><ul>
  99. <li class="toctree-l2"><a class="reference internal" href="#version">version</a></li>
  100. <li class="toctree-l2"><a class="reference internal" href="#versionmin">versionMin</a></li>
  101. <li class="toctree-l2"><a class="reference internal" href="#versionmax">versionMax</a></li>
  102. <li class="toctree-l2"><a class="reference internal" href="#ecclevel">eccLevel</a></li>
  103. <li class="toctree-l2"><a class="reference internal" href="#maskpattern">maskPattern</a></li>
  104. <li class="toctree-l2"><a class="reference internal" href="#addquietzone">addQuietzone</a></li>
  105. <li class="toctree-l2"><a class="reference internal" href="#quietzonesize">quietzoneSize</a></li>
  106. <li class="toctree-l2"><a class="reference internal" href="#outputtype">outputType</a></li>
  107. <li class="toctree-l2"><a class="reference internal" href="#outputinterface">outputInterface</a></li>
  108. <li class="toctree-l2"><a class="reference internal" href="#returnresource">returnResource</a></li>
  109. <li class="toctree-l2"><a class="reference internal" href="#cachefile">cachefile</a></li>
  110. <li class="toctree-l2"><a class="reference internal" href="#outputbase64">outputBase64</a></li>
  111. <li class="toctree-l2"><a class="reference internal" href="#eol">eol</a></li>
  112. <li class="toctree-l2"><a class="reference internal" href="#bgcolor">bgColor</a></li>
  113. <li class="toctree-l2"><a class="reference internal" href="#invertmatrix">invertMatrix</a></li>
  114. <li class="toctree-l2"><a class="reference internal" href="#drawlightmodules">drawLightModules</a></li>
  115. <li class="toctree-l2"><a class="reference internal" href="#drawcircularmodules">drawCircularModules</a></li>
  116. <li class="toctree-l2"><a class="reference internal" href="#circleradius">circleRadius</a></li>
  117. <li class="toctree-l2"><a class="reference internal" href="#keepassquare">keepAsSquare</a></li>
  118. <li class="toctree-l2"><a class="reference internal" href="#connectpaths">connectPaths</a></li>
  119. <li class="toctree-l2"><a class="reference internal" href="#excludefromconnect">excludeFromConnect</a></li>
  120. <li class="toctree-l2"><a class="reference internal" href="#modulevalues">moduleValues</a></li>
  121. <li class="toctree-l2"><a class="reference internal" href="#addlogospace">addLogoSpace</a></li>
  122. <li class="toctree-l2"><a class="reference internal" href="#logospacewidth">logoSpaceWidth</a></li>
  123. <li class="toctree-l2"><a class="reference internal" href="#logospaceheight">logoSpaceHeight</a></li>
  124. <li class="toctree-l2"><a class="reference internal" href="#logospacestartx">logoSpaceStartX</a></li>
  125. <li class="toctree-l2"><a class="reference internal" href="#logospacestarty">logoSpaceStartY</a></li>
  126. <li class="toctree-l2"><a class="reference internal" href="#scale">scale</a></li>
  127. <li class="toctree-l2"><a class="reference internal" href="#imagetransparent">imageTransparent</a></li>
  128. <li class="toctree-l2"><a class="reference internal" href="#transparencycolor">transparencyColor</a></li>
  129. <li class="toctree-l2"><a class="reference internal" href="#quality">quality</a></li>
  130. <li class="toctree-l2"><a class="reference internal" href="#gdimageuseupscale">gdImageUseUpscale</a></li>
  131. <li class="toctree-l2"><a class="reference internal" href="#imagickformat">imagickFormat</a></li>
  132. <li class="toctree-l2"><a class="reference internal" href="#cssclass">cssClass</a></li>
  133. <li class="toctree-l2"><a class="reference internal" href="#svgaddxmlheader">svgAddXmlHeader</a></li>
  134. <li class="toctree-l2"><a class="reference internal" href="#svgdefs">svgDefs</a></li>
  135. <li class="toctree-l2"><a class="reference internal" href="#svgpreserveaspectratio">svgPreserveAspectRatio</a></li>
  136. <li class="toctree-l2"><a class="reference internal" href="#svgusefillattributes">svgUseFillAttributes</a></li>
  137. <li class="toctree-l2"><a class="reference internal" href="#textlinestart">textLineStart</a></li>
  138. <li class="toctree-l2"><a class="reference internal" href="#jsonflags">jsonFlags</a></li>
  139. <li class="toctree-l2"><a class="reference internal" href="#jsonasbooleans">jsonAsBooleans</a></li>
  140. <li class="toctree-l2"><a class="reference internal" href="#fpdfmeasureunit">fpdfMeasureUnit</a></li>
  141. <li class="toctree-l2"><a class="reference internal" href="#readeruseimagickifavailable">readerUseImagickIfAvailable</a></li>
  142. <li class="toctree-l2"><a class="reference internal" href="#readergrayscale">readerGrayscale</a></li>
  143. <li class="toctree-l2"><a class="reference internal" href="#readerinvertcolors">readerInvertColors</a></li>
  144. <li class="toctree-l2"><a class="reference internal" href="#readerincreasecontrast">readerIncreaseContrast</a></li>
  145. <li class="toctree-l2"><a class="reference internal" href="#imagebase64">imageBase64</a></li>
  146. <li class="toctree-l2"><a class="reference internal" href="#jpegquality">jpegQuality</a></li>
  147. <li class="toctree-l2"><a class="reference internal" href="#pngcompression">pngCompression</a></li>
  148. <li class="toctree-l2"><a class="reference internal" href="#imagetransparencybg">imageTransparencyBG</a></li>
  149. <li class="toctree-l2"><a class="reference internal" href="#imagickbg">imagickBG</a></li>
  150. </ul>
  151. </li>
  152. </ul>
  153. <p class="caption" role="heading"><span class="caption-text">Customizing output</span></p>
  154. <ul>
  155. <li class="toctree-l1"><a class="reference internal" href="../Customizing/Module-Values.html">Module values</a><ul>
  156. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Module-Values.html#basics">Basics</a></li>
  157. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Module-Values.html#assigning-values">Assigning values</a></li>
  158. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Module-Values.html#handling-in-your-own-qroutputinterface">Handling in your own <code class="docutils literal notranslate"><span class="pre">QROutputInterface</span></code></a><ul>
  159. <li class="toctree-l3"><a class="reference internal" href="../Customizing/Module-Values.html#setting-module-values">Setting module values</a></li>
  160. <li class="toctree-l3"><a class="reference internal" href="../Customizing/Module-Values.html#using-the-module-values">Using the module values</a></li>
  161. </ul>
  162. </li>
  163. </ul>
  164. </li>
  165. <li class="toctree-l1"><a class="reference internal" href="../Customizing/QROutputAbstract.html"><code class="docutils literal notranslate"><span class="pre">QROutputAbstract</span></code></a><ul>
  166. <li class="toctree-l2"><a class="reference internal" href="../Customizing/QROutputAbstract.html#properties">Properties</a><ul>
  167. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#options-and-matrix"><code class="docutils literal notranslate"><span class="pre">$options</span></code> and <code class="docutils literal notranslate"><span class="pre">$matrix</span></code></a></li>
  168. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#modulecount-scale-and-length"><code class="docutils literal notranslate"><span class="pre">$moduleCount</span></code>, <code class="docutils literal notranslate"><span class="pre">$scale</span></code> and <code class="docutils literal notranslate"><span class="pre">$length</span></code></a></li>
  169. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#modulevalues"><code class="docutils literal notranslate"><span class="pre">$moduleValues</span></code></a></li>
  170. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#copies-of-qroptions-values">Copies of <code class="docutils literal notranslate"><span class="pre">QROptions</span></code> values</a></li>
  171. </ul>
  172. </li>
  173. <li class="toctree-l2"><a class="reference internal" href="../Customizing/QROutputAbstract.html#methods">Methods</a><ul>
  174. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#setmodulevalues"><code class="docutils literal notranslate"><span class="pre">setModuleValues()</span></code></a></li>
  175. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#modulevalueisvalid"><code class="docutils literal notranslate"><span class="pre">moduleValueIsValid()</span></code></a></li>
  176. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#preparemodulevalue"><code class="docutils literal notranslate"><span class="pre">prepareModuleValue()</span></code></a></li>
  177. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#getdefaultmodulevalue"><code class="docutils literal notranslate"><span class="pre">getDefaultModuleValue()</span></code></a></li>
  178. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#getmodulevalue-and-getmodulevalueat"><code class="docutils literal notranslate"><span class="pre">getModuleValue()</span></code> and <code class="docutils literal notranslate"><span class="pre">getModuleValueAt()</span></code></a></li>
  179. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#setmatrixdimensions"><code class="docutils literal notranslate"><span class="pre">setMatrixDimensions()</span></code></a></li>
  180. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#getoutputdimensions"><code class="docutils literal notranslate"><span class="pre">getOutputDimensions()</span></code></a></li>
  181. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#collectmodules"><code class="docutils literal notranslate"><span class="pre">collectModules()</span></code></a></li>
  182. <li class="toctree-l3"><a class="reference internal" href="../Customizing/QROutputAbstract.html#savetofile-and-tobase64datauri"><code class="docutils literal notranslate"><span class="pre">saveToFile()</span></code> and <code class="docutils literal notranslate"><span class="pre">toBase64DataURI()</span></code></a></li>
  183. </ul>
  184. </li>
  185. </ul>
  186. </li>
  187. <li class="toctree-l1"><a class="reference internal" href="../Customizing/Custom-output-interface.html">Custom <code class="docutils literal notranslate"><span class="pre">QROutputInterface</span></code></a><ul>
  188. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Custom-output-interface.html#class-skeleton">Class skeleton</a></li>
  189. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Custom-output-interface.html#module-values">Module values</a></li>
  190. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Custom-output-interface.html#transform-the-output">Transform the output</a></li>
  191. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Custom-output-interface.html#run-the-custom-output">Run the custom output</a></li>
  192. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Custom-output-interface.html#summary">Summary</a></li>
  193. </ul>
  194. </li>
  195. </ul>
  196. <p class="caption" role="heading"><span class="caption-text">Built-In Output Modules</span></p>
  197. <ul>
  198. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QREps.html">QREps</a><ul>
  199. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QREps.html#example">Example</a></li>
  200. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QREps.html#additional-methods">Additional methods</a></li>
  201. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QREps.html#options-that-affect-this-module">Options that affect this module</a><ul>
  202. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QREps.html#options-that-have-no-effect">Options that have no effect</a></li>
  203. </ul>
  204. </li>
  205. </ul>
  206. </li>
  207. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRFpdf.html">QRFpdf</a><ul>
  208. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#example">Example</a></li>
  209. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#additional-methods">Additional methods</a></li>
  210. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#options-that-affect-this-module">Options that affect this module</a><ul>
  211. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#options-that-have-no-effect">Options that have no effect</a></li>
  212. </ul>
  213. </li>
  214. </ul>
  215. </li>
  216. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRGdImage.html">QRGdImage</a><ul>
  217. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#example">Example</a></li>
  218. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#additional-methods">Additional methods</a></li>
  219. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#options-that-affect-this-module">Options that affect this module</a><ul>
  220. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#options-that-have-no-effect">Options that have no effect</a></li>
  221. </ul>
  222. </li>
  223. </ul>
  224. </li>
  225. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRImagick.html">QRImagick</a><ul>
  226. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#example">Example</a></li>
  227. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#additional-methods">Additional methods</a></li>
  228. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#options-that-affect-this-module">Options that affect this module</a><ul>
  229. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRImagick.html#options-that-have-no-effect">Options that have no effect</a></li>
  230. </ul>
  231. </li>
  232. </ul>
  233. </li>
  234. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html">QRMarkupHTML</a><ul>
  235. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#example">Example</a></li>
  236. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#additional-methods">Additional methods</a></li>
  237. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#options-that-affect-this-module">Options that affect this module</a><ul>
  238. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#options-that-have-no-effect">Options that have no effect</a></li>
  239. </ul>
  240. </li>
  241. </ul>
  242. </li>
  243. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html">QRMarkupSVG</a><ul>
  244. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#example">Example</a></li>
  245. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#additional-methods">Additional methods</a></li>
  246. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#options-that-affect-this-module">Options that affect this module</a><ul>
  247. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#options-that-have-no-effect">Options that have no effect</a></li>
  248. </ul>
  249. </li>
  250. </ul>
  251. </li>
  252. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRString.html">QRString</a><ul>
  253. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#plain-text">Plain text</a></li>
  254. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#json">JSON</a></li>
  255. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#additional-methods">Additional methods</a></li>
  256. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#options-that-affect-this-module">Options that affect this module</a><ul>
  257. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRString.html#options-that-have-no-effect">Options that have no effect</a></li>
  258. </ul>
  259. </li>
  260. </ul>
  261. </li>
  262. </ul>
  263. <p class="caption" role="heading"><span class="caption-text">Appendix</span></p>
  264. <ul>
  265. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Terminology.html">Terminology</a><ul>
  266. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#qr-code">QR Code</a></li>
  267. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#matrix">Matrix</a><ul>
  268. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#module">Module</a></li>
  269. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#version">Version</a></li>
  270. </ul>
  271. </li>
  272. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#function-patterns">Function Patterns</a><ul>
  273. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#finder-pattern">Finder Pattern</a></li>
  274. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#alignment-pattern">Alignment Pattern</a></li>
  275. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#timing-pattern">Timing Pattern</a></li>
  276. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#separators">Separators</a></li>
  277. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#quiet-zone">Quiet Zone</a></li>
  278. </ul>
  279. </li>
  280. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#encoding-region">Encoding Region</a><ul>
  281. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#data">Data</a></li>
  282. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#version-information">Version Information</a></li>
  283. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#format-information">Format Information</a></li>
  284. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#darkmodule">Darkmodule</a></li>
  285. </ul>
  286. </li>
  287. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#mode">Mode</a><ul>
  288. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#segment">Segment</a></li>
  289. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#extended-channel-interpretation-eci">Extended Channel Interpretation (ECI)</a></li>
  290. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#mixed-mode">Mixed Mode</a></li>
  291. </ul>
  292. </li>
  293. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#ecc-error-correction-coding">ECC (Error Correction Coding)</a><ul>
  294. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#ecc-level">ECC Level</a></li>
  295. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#maximum-data-capacity">Maximum data capacity</a></li>
  296. </ul>
  297. </li>
  298. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#data-masking">Data masking</a><ul>
  299. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#evaluation">Evaluation</a></li>
  300. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#mask-pattern">Mask pattern</a></li>
  301. </ul>
  302. </li>
  303. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#reflectance">Reflectance</a></li>
  304. </ul>
  305. </li>
  306. <li class="toctree-l1"><a class="reference internal" href="../Appendix/URI-Content.html">Popular content and URI schemes</a><ul>
  307. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#url-https">URL <code class="docutils literal notranslate"><span class="pre">https</span></code></a></li>
  308. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#e-mail-mailto">E-Mail <code class="docutils literal notranslate"><span class="pre">mailto</span></code></a></li>
  309. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#phone-numbers-tel">Phone numbers <code class="docutils literal notranslate"><span class="pre">tel</span></code></a></li>
  310. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#geo-coordinates-geo">Geo Coordinates <code class="docutils literal notranslate"><span class="pre">geo</span></code></a></li>
  311. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#mobile-authenticators-otpauth">Mobile Authenticators <code class="docutils literal notranslate"><span class="pre">otpauth</span></code></a></li>
  312. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#wireless-network-configuration">Wireless Network configuration</a></li>
  313. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#contact-information-vcard">Contact information: vCard</a></li>
  314. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#calendar-events-vcalendar-and-icalendar">Calendar Events: vCalendar and iCalendar</a></li>
  315. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#see-also">See also</a></li>
  316. </ul>
  317. </li>
  318. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Performance-considerations.html">Performance considerations</a><ul>
  319. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#version">Version</a></li>
  320. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#ecc-level">Ecc level</a></li>
  321. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#data-mode">Data mode</a></li>
  322. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#mask-pattern">Mask pattern</a></li>
  323. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#output">Output</a></li>
  324. </ul>
  325. </li>
  326. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Contribute.html">How to contribute</a><ul>
  327. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#questions-and-issues">Questions and issues</a></li>
  328. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#bug-reports">Bug reports</a></li>
  329. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#pull-requests-and-bug-fixes">Pull requests and bug fixes</a></li>
  330. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#documentation">Documentation</a></li>
  331. </ul>
  332. </li>
  333. <li class="toctree-l1"><a class="reference internal" href="../Appendix/License.html">License</a></li>
  334. </ul>
  335. </div>
  336. </div>
  337. </nav>
  338. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
  339. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  340. <a href="../index.html">PHP-QRCode</a>
  341. </nav>
  342. <div class="wy-nav-content">
  343. <div class="rst-content">
  344. <div role="navigation" aria-label="Page navigation">
  345. <ul class="wy-breadcrumbs">
  346. <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
  347. <li class="breadcrumb-item active">Configuration settings</li>
  348. <li class="wy-breadcrumbs-aside">
  349. <a href="https://github.com/chillerlan/php-qrcode/blob/main/docs/Usage/Configuration-settings.md" class="fa fa-github"> Edit on GitHub</a>
  350. </li>
  351. </ul>
  352. <hr/>
  353. </div>
  354. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  355. <div itemprop="articleBody">
  356. <section id="configuration-settings">
  357. <h1>Configuration settings<a class="headerlink" href="#configuration-settings" title="Link to this heading"></a></h1>
  358. <!-- This file is auto generated from the source of QROptionsTrait.php -->
  359. <section id="version">
  360. <h2>version<a class="headerlink" href="#version" title="Link to this heading"></a></h2>
  361. <p>QR Code version number</p>
  362. <p><code class="docutils literal notranslate"><span class="pre">1</span> <span class="pre">...</span> <span class="pre">40</span></code> or <code class="docutils literal notranslate"><span class="pre">Version::AUTO</span></code> (default)</p>
  363. <p><strong>See also:</strong></p>
  364. <ul class="simple">
  365. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\Version</span></code></p></li>
  366. </ul>
  367. </section>
  368. <section id="versionmin">
  369. <h2>versionMin<a class="headerlink" href="#versionmin" title="Link to this heading"></a></h2>
  370. <p>Minimum QR version</p>
  371. <p>if <code class="docutils literal notranslate"><span class="pre">QROptions::$version</span></code> is set to <code class="docutils literal notranslate"><span class="pre">Version::AUTO</span></code> (default: 1)</p>
  372. </section>
  373. <section id="versionmax">
  374. <h2>versionMax<a class="headerlink" href="#versionmax" title="Link to this heading"></a></h2>
  375. <p>Maximum QR version</p>
  376. <p>if <code class="docutils literal notranslate"><span class="pre">QROptions::$version</span></code> is set to <code class="docutils literal notranslate"><span class="pre">Version::AUTO</span></code> (default: 40)</p>
  377. </section>
  378. <section id="ecclevel">
  379. <h2>eccLevel<a class="headerlink" href="#ecclevel" title="Link to this heading"></a></h2>
  380. <p>Error correct level</p>
  381. <p><code class="docutils literal notranslate"><span class="pre">EccLevel::X</span></code> where <code class="docutils literal notranslate"><span class="pre">X</span></code> is:</p>
  382. <ul class="simple">
  383. <li><p><code class="docutils literal notranslate"><span class="pre">L</span></code> =&gt; 7% (default)</p></li>
  384. <li><p><code class="docutils literal notranslate"><span class="pre">M</span></code> =&gt; 15%</p></li>
  385. <li><p><code class="docutils literal notranslate"><span class="pre">Q</span></code> =&gt; 25%</p></li>
  386. <li><p><code class="docutils literal notranslate"><span class="pre">H</span></code> =&gt; 30%</p></li>
  387. </ul>
  388. <p><strong>See also:</strong></p>
  389. <ul class="simple">
  390. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\EccLevel</span></code></p></li>
  391. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/discussions/160">github.com/chillerlan/php-qrcode/discussions/160</a></p></li>
  392. </ul>
  393. </section>
  394. <section id="maskpattern">
  395. <h2>maskPattern<a class="headerlink" href="#maskpattern" title="Link to this heading"></a></h2>
  396. <p>Mask Pattern to use (no value in using, mostly for unit testing purposes)</p>
  397. <p><code class="docutils literal notranslate"><span class="pre">0</span> <span class="pre">...</span> <span class="pre">7</span></code> or <code class="docutils literal notranslate"><span class="pre">MaskPattern::PATTERN_AUTO</span></code> (default)</p>
  398. <p><strong>See also:</strong></p>
  399. <ul class="simple">
  400. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\MaskPattern</span></code></p></li>
  401. </ul>
  402. </section>
  403. <section id="addquietzone">
  404. <h2>addQuietzone<a class="headerlink" href="#addquietzone" title="Link to this heading"></a></h2>
  405. <p>Add a “quiet zone” (margin) according to the QR code spec</p>
  406. <p><strong>See also:</strong></p>
  407. <ul class="simple">
  408. <li><p><a class="reference external" href="https://www.qrcode.com/en/howto/code.html">www.qrcode.com/en/howto/code.html</a></p></li>
  409. </ul>
  410. </section>
  411. <section id="quietzonesize">
  412. <h2>quietzoneSize<a class="headerlink" href="#quietzonesize" title="Link to this heading"></a></h2>
  413. <p>Size of the quiet zone</p>
  414. <p>internally clamped to <code class="docutils literal notranslate"><span class="pre">0</span> <span class="pre">...</span> <span class="pre">$moduleCount</span> <span class="pre">/</span> <span class="pre">2</span></code> (default: 4)</p>
  415. </section>
  416. <section id="outputtype">
  417. <h2>outputType<a class="headerlink" href="#outputtype" title="Link to this heading"></a></h2>
  418. <p>The built-in output type</p>
  419. <ul class="simple">
  420. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::MARKUP_SVG</span></code> (default)</p></li>
  421. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::MARKUP_HTML</span></code></p></li>
  422. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_BMP</span></code></p></li>
  423. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_GIF</span></code></p></li>
  424. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_JPG</span></code></p></li>
  425. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_PNG</span></code></p></li>
  426. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_WEBP</span></code></p></li>
  427. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::STRING_TEXT</span></code></p></li>
  428. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::STRING_JSON</span></code></p></li>
  429. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::IMAGICK</span></code></p></li>
  430. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::EPS</span></code></p></li>
  431. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::FPDF</span></code></p></li>
  432. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::CUSTOM</span></code></p></li>
  433. </ul>
  434. <p><strong>Deprecated:</strong> 5.0.0 see issue #223</p>
  435. <p><strong>See also:</strong></p>
  436. <ul class="simple">
  437. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QREps</span></code></p></li>
  438. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRFpdf</span></code></p></li>
  439. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRGdImage</span></code></p></li>
  440. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRImagick</span></code></p></li>
  441. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRMarkupHTML</span></code></p></li>
  442. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRMarkupSVG</span></code></p></li>
  443. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRString</span></code></p></li>
  444. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/issues/223">github.com/chillerlan/php-qrcode/issues/223</a></p></li>
  445. </ul>
  446. </section>
  447. <section id="outputinterface">
  448. <h2>outputInterface<a class="headerlink" href="#outputinterface" title="Link to this heading"></a></h2>
  449. <p>The FQCN of the custom <code class="docutils literal notranslate"><span class="pre">QROutputInterface</span></code></p>
  450. <p>if <code class="docutils literal notranslate"><span class="pre">QROptions::$outputType</span></code> is set to <code class="docutils literal notranslate"><span class="pre">QROutputInterface::CUSTOM</span></code> (default: <code class="docutils literal notranslate"><span class="pre">null</span></code>)</p>
  451. <p><strong>Deprecated:</strong> 5.0.0 the nullable type will be removed in future versions
  452. and the default value will be set to <code class="docutils literal notranslate"><span class="pre">QRMarkupSVG::class</span></code></p>
  453. </section>
  454. <section id="returnresource">
  455. <h2>returnResource<a class="headerlink" href="#returnresource" title="Link to this heading"></a></h2>
  456. <p>Return the image resource instead of a render if applicable.</p>
  457. <ul class="simple">
  458. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code>: <code class="docutils literal notranslate"><span class="pre">resource</span></code> (PHP &lt; 8), <code class="docutils literal notranslate"><span class="pre">GdImage</span></code></p></li>
  459. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: <code class="docutils literal notranslate"><span class="pre">Imagick</span></code></p></li>
  460. <li><p><code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>: <code class="docutils literal notranslate"><span class="pre">FPDF</span></code></p></li>
  461. </ul>
  462. <p>This option overrides/ignores other output settings, such as <code class="docutils literal notranslate"><span class="pre">QROptions::$cachefile</span></code>
  463. and <code class="docutils literal notranslate"><span class="pre">QROptions::$outputBase64</span></code>. (default: <code class="docutils literal notranslate"><span class="pre">false</span></code>)</p>
  464. <p><strong>See also:</strong></p>
  465. <ul class="simple">
  466. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputInterface::dump()</span></code></p></li>
  467. </ul>
  468. </section>
  469. <section id="cachefile">
  470. <h2>cachefile<a class="headerlink" href="#cachefile" title="Link to this heading"></a></h2>
  471. <p>Optional cache file path <code class="docutils literal notranslate"><span class="pre">/path/to/cache.file</span></code></p>
  472. <p>Please note that the <code class="docutils literal notranslate"><span class="pre">$file</span></code> parameter in <code class="docutils literal notranslate"><span class="pre">QRCode::render()</span></code> and <code class="docutils literal notranslate"><span class="pre">QRCode::renderMatrix()</span></code>
  473. takes precedence over the <code class="docutils literal notranslate"><span class="pre">QROptions::$cachefile</span></code> value. (default: <code class="docutils literal notranslate"><span class="pre">null</span></code>)</p>
  474. <p><strong>See also:</strong></p>
  475. <ul class="simple">
  476. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::render()</span></code></p></li>
  477. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::renderMatrix()</span></code></p></li>
  478. </ul>
  479. </section>
  480. <section id="outputbase64">
  481. <h2>outputBase64<a class="headerlink" href="#outputbase64" title="Link to this heading"></a></h2>
  482. <p>Toggle base64 data URI or raw data output (if applicable)</p>
  483. <p>(default: <code class="docutils literal notranslate"><span class="pre">true</span></code>)</p>
  484. <p><strong>See also:</strong></p>
  485. <ul class="simple">
  486. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::toBase64DataURI()</span></code></p></li>
  487. </ul>
  488. </section>
  489. <section id="eol">
  490. <h2>eol<a class="headerlink" href="#eol" title="Link to this heading"></a></h2>
  491. <p>Newline string</p>
  492. <p>(default: <code class="docutils literal notranslate"><span class="pre">PHP_EOL</span></code>)</p>
  493. </section>
  494. <section id="bgcolor">
  495. <h2>bgColor<a class="headerlink" href="#bgcolor" title="Link to this heading"></a></h2>
  496. <p>Sets the image background color (if applicable)</p>
  497. <ul class="simple">
  498. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: defaults to <code class="docutils literal notranslate"><span class="pre">&quot;white&quot;</span></code></p></li>
  499. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code>: defaults to <code class="docutils literal notranslate"><span class="pre">[255,</span> <span class="pre">255,</span> <span class="pre">255]</span></code></p></li>
  500. <li><p><code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>: defaults to blank internally (white page)</p></li>
  501. </ul>
  502. </section>
  503. <section id="invertmatrix">
  504. <h2>invertMatrix<a class="headerlink" href="#invertmatrix" title="Link to this heading"></a></h2>
  505. <p>Whether to invert the matrix (reflectance reversal)</p>
  506. <p>(default: <code class="docutils literal notranslate"><span class="pre">false</span></code>)</p>
  507. <p><strong>See also:</strong></p>
  508. <ul class="simple">
  509. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Data\QRMatrix::invert()</span></code></p></li>
  510. </ul>
  511. </section>
  512. <section id="drawlightmodules">
  513. <h2>drawLightModules<a class="headerlink" href="#drawlightmodules" title="Link to this heading"></a></h2>
  514. <p>Whether to draw the light (false) modules</p>
  515. <p>(default: <code class="docutils literal notranslate"><span class="pre">true</span></code>)</p>
  516. </section>
  517. <section id="drawcircularmodules">
  518. <h2>drawCircularModules<a class="headerlink" href="#drawcircularmodules" title="Link to this heading"></a></h2>
  519. <p>Specify whether to draw the modules as filled circles</p>
  520. <p>a note for <code class="docutils literal notranslate"><span class="pre">GdImage</span></code> output:</p>
  521. <p>if <code class="docutils literal notranslate"><span class="pre">QROptions::$scale</span></code> is less than 20, the image will be upscaled internally, then the modules will be drawn
  522. using <code class="docutils literal notranslate"><span class="pre">imagefilledellipse()</span></code> and then scaled back to the expected size</p>
  523. <p>No effect in: <code class="docutils literal notranslate"><span class="pre">QREps</span></code>, <code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>, <code class="docutils literal notranslate"><span class="pre">QRMarkupHTML</span></code></p>
  524. <p><strong>See also:</strong></p>
  525. <ul class="simple">
  526. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagefilledellipse">php.net: <code class="docutils literal notranslate"><span class="pre">\imagefilledellipse()</span></code></a></p></li>
  527. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/issues/23">github.com/chillerlan/php-qrcode/issues/23</a></p></li>
  528. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/discussions/122">github.com/chillerlan/php-qrcode/discussions/122</a></p></li>
  529. </ul>
  530. </section>
  531. <section id="circleradius">
  532. <h2>circleRadius<a class="headerlink" href="#circleradius" title="Link to this heading"></a></h2>
  533. <p>Specifies the radius of the modules when <code class="docutils literal notranslate"><span class="pre">QROptions::$drawCircularModules</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
  534. <p>(default: 0.45)</p>
  535. </section>
  536. <section id="keepassquare">
  537. <h2>keepAsSquare<a class="headerlink" href="#keepassquare" title="Link to this heading"></a></h2>
  538. <p>Specifies which module types to exclude when <code class="docutils literal notranslate"><span class="pre">QROptions::$drawCircularModules</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
  539. <p>(default: <code class="docutils literal notranslate"><span class="pre">[]</span></code>)</p>
  540. </section>
  541. <section id="connectpaths">
  542. <h2>connectPaths<a class="headerlink" href="#connectpaths" title="Link to this heading"></a></h2>
  543. <p>Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc.</p>
  544. <p><strong>See also:</strong></p>
  545. <ul class="simple">
  546. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/issues/57">github.com/chillerlan/php-qrcode/issues/57</a></p></li>
  547. </ul>
  548. </section>
  549. <section id="excludefromconnect">
  550. <h2>excludeFromConnect<a class="headerlink" href="#excludefromconnect" title="Link to this heading"></a></h2>
  551. <p>Specify which paths/patterns to exclude from connecting if <code class="docutils literal notranslate"><span class="pre">QROptions::$connectPaths</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
  552. </section>
  553. <section id="modulevalues">
  554. <h2>moduleValues<a class="headerlink" href="#modulevalues" title="Link to this heading"></a></h2>
  555. <p>Module values map</p>
  556. <ul class="simple">
  557. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>, <code class="docutils literal notranslate"><span class="pre">QRMarkupHTML</span></code>, <code class="docutils literal notranslate"><span class="pre">QRMarkupSVG</span></code>: #ABCDEF, cssname, rgb(), rgba()…</p></li>
  558. <li><p><code class="docutils literal notranslate"><span class="pre">QREps</span></code>, <code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>, <code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code>: <code class="docutils literal notranslate"><span class="pre">[R,</span> <span class="pre">G,</span> <span class="pre">B]</span></code> // 0-255</p></li>
  559. <li><p><code class="docutils literal notranslate"><span class="pre">QREps</span></code>: <code class="docutils literal notranslate"><span class="pre">[C,</span> <span class="pre">M,</span> <span class="pre">Y,</span> <span class="pre">K]</span></code> // 0-255</p></li>
  560. </ul>
  561. <p><strong>See also:</strong></p>
  562. <ul class="simple">
  563. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::setModuleValues()</span></code></p></li>
  564. </ul>
  565. </section>
  566. <section id="addlogospace">
  567. <h2>addLogoSpace<a class="headerlink" href="#addlogospace" title="Link to this heading"></a></h2>
  568. <p>Toggles logo space creation</p>
  569. <p><strong>See also:</strong></p>
  570. <ul class="simple">
  571. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::addMatrixModifications()</span></code></p></li>
  572. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Data\QRMatrix::setLogoSpace()</span></code></p></li>
  573. </ul>
  574. </section>
  575. <section id="logospacewidth">
  576. <h2>logoSpaceWidth<a class="headerlink" href="#logospacewidth" title="Link to this heading"></a></h2>
  577. <p>Width of the logo space</p>
  578. <p>if only <code class="docutils literal notranslate"><span class="pre">QROptions::$logoSpaceWidth</span></code> is given, the logo space is assumed a square of that size</p>
  579. </section>
  580. <section id="logospaceheight">
  581. <h2>logoSpaceHeight<a class="headerlink" href="#logospaceheight" title="Link to this heading"></a></h2>
  582. <p>Height of the logo space</p>
  583. <p>if only <code class="docutils literal notranslate"><span class="pre">QROptions::$logoSpaceHeight</span></code> is given, the logo space is assumed a square of that size</p>
  584. </section>
  585. <section id="logospacestartx">
  586. <h2>logoSpaceStartX<a class="headerlink" href="#logospacestartx" title="Link to this heading"></a></h2>
  587. <p>Optional horizontal start position of the logo space (top left corner)</p>
  588. </section>
  589. <section id="logospacestarty">
  590. <h2>logoSpaceStartY<a class="headerlink" href="#logospacestarty" title="Link to this heading"></a></h2>
  591. <p>Optional vertical start position of the logo space (top left corner)</p>
  592. </section>
  593. <section id="scale">
  594. <h2>scale<a class="headerlink" href="#scale" title="Link to this heading"></a></h2>
  595. <p>Pixel size of a QR code module</p>
  596. </section>
  597. <section id="imagetransparent">
  598. <h2>imageTransparent<a class="headerlink" href="#imagetransparent" title="Link to this heading"></a></h2>
  599. <p>Toggle transparency</p>
  600. <ul class="simple">
  601. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code> and <code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: the given <code class="docutils literal notranslate"><span class="pre">QROptions::$transparencyColor</span></code> is set as transparent</p></li>
  602. </ul>
  603. <p><strong>See also:</strong></p>
  604. <ul class="simple">
  605. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/discussions/121">github.com/chillerlan/php-qrcode/discussions/121</a></p></li>
  606. </ul>
  607. </section>
  608. <section id="transparencycolor">
  609. <h2>transparencyColor<a class="headerlink" href="#transparencycolor" title="Link to this heading"></a></h2>
  610. <p>Sets a transparency color for when <code class="docutils literal notranslate"><span class="pre">QROptions::$imageTransparent</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
  611. <p>Defaults to <code class="docutils literal notranslate"><span class="pre">QROptions::$bgColor</span></code>.</p>
  612. <ul class="simple">
  613. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code>: <code class="docutils literal notranslate"><span class="pre">[R,</span> <span class="pre">G,</span> <span class="pre">B]</span></code>, this color is set as transparent in <code class="docutils literal notranslate"><span class="pre">imagecolortransparent()</span></code></p></li>
  614. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: <code class="docutils literal notranslate"><span class="pre">&quot;color_str&quot;</span></code>, this color is set in <code class="docutils literal notranslate"><span class="pre">Imagick::transparentPaintImage()</span></code></p></li>
  615. </ul>
  616. <p><strong>See also:</strong></p>
  617. <ul class="simple">
  618. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagecolortransparent">php.net: <code class="docutils literal notranslate"><span class="pre">\imagecolortransparent()</span></code></a></p></li>
  619. <li><p><a class="reference external" href="https://www.php.net/manual/imagick.transparentpaintimage">php.net: <code class="docutils literal notranslate"><span class="pre">\Imagick::transparentPaintImage()</span></code></a></p></li>
  620. </ul>
  621. </section>
  622. <section id="quality">
  623. <h2>quality<a class="headerlink" href="#quality" title="Link to this heading"></a></h2>
  624. <p>Compression quality</p>
  625. <p>The given value depends on the used output type:</p>
  626. <ul class="simple">
  627. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImageBMP</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...1]</span></code></p></li>
  628. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImageJPEG</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...100]</span></code></p></li>
  629. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImageWEBP</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...9]</span></code></p></li>
  630. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImagePNG</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...100]</span></code></p></li>
  631. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...100]</span></code></p></li>
  632. </ul>
  633. <p><strong>See also:</strong></p>
  634. <ul class="simple">
  635. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagebmp">php.net: <code class="docutils literal notranslate"><span class="pre">\imagebmp()</span></code></a></p></li>
  636. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagejpeg">php.net: <code class="docutils literal notranslate"><span class="pre">\imagejpeg()</span></code></a></p></li>
  637. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagepng">php.net: <code class="docutils literal notranslate"><span class="pre">\imagepng()</span></code></a></p></li>
  638. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagewebp">php.net: <code class="docutils literal notranslate"><span class="pre">\imagewebp()</span></code></a></p></li>
  639. <li><p><a class="reference external" href="https://www.php.net/manual/imagick.setimagecompressionquality">php.net: <code class="docutils literal notranslate"><span class="pre">\Imagick::setImageCompressionQuality()</span></code></a></p></li>
  640. </ul>
  641. </section>
  642. <section id="gdimageuseupscale">
  643. <h2>gdImageUseUpscale<a class="headerlink" href="#gdimageuseupscale" title="Link to this heading"></a></h2>
  644. <p>Toggles the usage of internal upscaling when <code class="docutils literal notranslate"><span class="pre">QROptions::$drawCircularModules</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> and
  645. <code class="docutils literal notranslate"><span class="pre">QROptions::$scale</span></code> is less than 20</p>
  646. <p><strong>See also:</strong></p>
  647. <ul class="simple">
  648. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRGdImage::createImage()</span></code></p></li>
  649. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/issues/23">github.com/chillerlan/php-qrcode/issues/23</a></p></li>
  650. </ul>
  651. </section>
  652. <section id="imagickformat">
  653. <h2>imagickFormat<a class="headerlink" href="#imagickformat" title="Link to this heading"></a></h2>
  654. <p>Imagick output format</p>
  655. <p><strong>See also:</strong></p>
  656. <ul class="simple">
  657. <li><p><a class="reference external" href="https://www.php.net/manual/imagick.setimageformat">php.net: <code class="docutils literal notranslate"><span class="pre">\Imagick::setImageFormat()</span></code></a></p></li>
  658. <li><p><a class="reference external" href="https://www.imagemagick.org/script/formats.php">www.imagemagick.org/script/formats.php</a></p></li>
  659. </ul>
  660. </section>
  661. <section id="cssclass">
  662. <h2>cssClass<a class="headerlink" href="#cssclass" title="Link to this heading"></a></h2>
  663. <p>A common css class</p>
  664. </section>
  665. <section id="svgaddxmlheader">
  666. <h2>svgAddXmlHeader<a class="headerlink" href="#svgaddxmlheader" title="Link to this heading"></a></h2>
  667. <p>Whether to add an XML header line or not, e.g. to embed the SVG directly in HTML</p>
  668. <p><code class="docutils literal notranslate"><span class="pre">&lt;?xml</span> <span class="pre">version=&quot;1.0&quot;</span> <span class="pre">encoding=&quot;UTF-8&quot;?&gt;</span></code></p>
  669. </section>
  670. <section id="svgdefs">
  671. <h2>svgDefs<a class="headerlink" href="#svgdefs" title="Link to this heading"></a></h2>
  672. <p>Anything in the SVG <code class="docutils literal notranslate"><span class="pre">&lt;defs&gt;</span></code> tag</p>
  673. <p><strong>See also:</strong></p>
  674. <ul class="simple">
  675. <li><p><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs">developer.mozilla.org/en-US/docs/Web/SVG/Element/defs</a></p></li>
  676. </ul>
  677. </section>
  678. <section id="svgpreserveaspectratio">
  679. <h2>svgPreserveAspectRatio<a class="headerlink" href="#svgpreserveaspectratio" title="Link to this heading"></a></h2>
  680. <p>Sets the value for the “preserveAspectRatio” on the <code class="docutils literal notranslate"><span class="pre">&lt;svg&gt;</span></code> element</p>
  681. <p><strong>See also:</strong></p>
  682. <ul class="simple">
  683. <li><p><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio">developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio</a></p></li>
  684. </ul>
  685. </section>
  686. <section id="svgusefillattributes">
  687. <h2>svgUseFillAttributes<a class="headerlink" href="#svgusefillattributes" title="Link to this heading"></a></h2>
  688. <p>Whether to use the SVG <code class="docutils literal notranslate"><span class="pre">fill</span></code> attributes</p>
  689. <p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code> (default), the <code class="docutils literal notranslate"><span class="pre">fill</span></code> attribute will be set with the module value for the <code class="docutils literal notranslate"><span class="pre">&lt;path&gt;</span></code> element’s <code class="docutils literal notranslate"><span class="pre">$M_TYPE</span></code>.
  690. When set to <code class="docutils literal notranslate"><span class="pre">false</span></code>, the module values map will be ignored and the QR Code may be styled via CSS.</p>
  691. <p><strong>See also:</strong></p>
  692. <ul class="simple">
  693. <li><p><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill">developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill</a></p></li>
  694. </ul>
  695. </section>
  696. <section id="textlinestart">
  697. <h2>textLineStart<a class="headerlink" href="#textlinestart" title="Link to this heading"></a></h2>
  698. <p>An optional line prefix, e.g. empty space to align the QR Code in a console</p>
  699. </section>
  700. <section id="jsonflags">
  701. <h2>jsonFlags<a class="headerlink" href="#jsonflags" title="Link to this heading"></a></h2>
  702. <p>Sets the flags to use for the <code class="docutils literal notranslate"><span class="pre">json_encode()</span></code> call</p>
  703. <p><strong>See also:</strong></p>
  704. <ul class="simple">
  705. <li><p><a class="reference external" href="https://www.php.net/manual/json.constants.php">www.php.net/manual/json.constants.php</a></p></li>
  706. </ul>
  707. </section>
  708. <section id="jsonasbooleans">
  709. <h2>jsonAsBooleans<a class="headerlink" href="#jsonasbooleans" title="Link to this heading"></a></h2>
  710. <p>Whether to return matrix values in JSON as booleans or <code class="docutils literal notranslate"><span class="pre">$M_TYPE</span></code> integers</p>
  711. </section>
  712. <section id="fpdfmeasureunit">
  713. <h2>fpdfMeasureUnit<a class="headerlink" href="#fpdfmeasureunit" title="Link to this heading"></a></h2>
  714. <p>Measurement unit for <code class="docutils literal notranslate"><span class="pre">FPDF</span></code> output: <code class="docutils literal notranslate"><span class="pre">pt</span></code>, <code class="docutils literal notranslate"><span class="pre">mm</span></code>, <code class="docutils literal notranslate"><span class="pre">cm</span></code>, <code class="docutils literal notranslate"><span class="pre">in</span></code> (default: <code class="docutils literal notranslate"><span class="pre">pt</span></code>)</p>
  715. <p><strong>See also:</strong></p>
  716. <ul class="simple">
  717. <li><p><code class="docutils literal notranslate"><span class="pre">FPDF::__construct()</span></code></p></li>
  718. </ul>
  719. </section>
  720. <section id="readeruseimagickifavailable">
  721. <h2>readerUseImagickIfAvailable<a class="headerlink" href="#readeruseimagickifavailable" title="Link to this heading"></a></h2>
  722. <p>Use Imagick (if available) when reading QR Codes</p>
  723. </section>
  724. <section id="readergrayscale">
  725. <h2>readerGrayscale<a class="headerlink" href="#readergrayscale" title="Link to this heading"></a></h2>
  726. <p>Grayscale the image before reading</p>
  727. </section>
  728. <section id="readerinvertcolors">
  729. <h2>readerInvertColors<a class="headerlink" href="#readerinvertcolors" title="Link to this heading"></a></h2>
  730. <p>Invert the colors of the image</p>
  731. </section>
  732. <section id="readerincreasecontrast">
  733. <h2>readerIncreaseContrast<a class="headerlink" href="#readerincreasecontrast" title="Link to this heading"></a></h2>
  734. <p>Increase the contrast before reading</p>
  735. <p>note that applying contrast works different in GD and Imagick, so mileage may vary</p>
  736. </section>
  737. <section id="imagebase64">
  738. <h2>imageBase64<a class="headerlink" href="#imagebase64" title="Link to this heading"></a></h2>
  739. <p><strong>Deprecated:</strong> 5.0.0 use QROptions::$outputBase64 instead</p>
  740. <p><strong>See also:</strong></p>
  741. <ul class="simple">
  742. <li><p><code class="docutils literal notranslate">&#160;&#160;&#160;&#160;&#160;&#160; <span class="pre">\chillerlan\QRCode\QROptions::$outputBase64</span></code></p></li>
  743. </ul>
  744. </section>
  745. <section id="jpegquality">
  746. <h2>jpegQuality<a class="headerlink" href="#jpegquality" title="Link to this heading"></a></h2>
  747. <p><strong>Deprecated:</strong> 5.0.0 use QROptions::$quality instead</p>
  748. <p><strong>See also:</strong></p>
  749. <ul class="simple">
  750. <li><p><code class="docutils literal notranslate">&#160;&#160;&#160;&#160;&#160;&#160; <span class="pre">\chillerlan\QRCode\QROptions::$quality</span></code></p></li>
  751. </ul>
  752. </section>
  753. <section id="pngcompression">
  754. <h2>pngCompression<a class="headerlink" href="#pngcompression" title="Link to this heading"></a></h2>
  755. <p><strong>Deprecated:</strong> 5.0.0 use QROptions::$quality instead</p>
  756. <p><strong>See also:</strong></p>
  757. <ul class="simple">
  758. <li><p><code class="docutils literal notranslate">&#160;&#160;&#160;&#160;&#160;&#160; <span class="pre">\chillerlan\QRCode\QROptions::$quality</span></code></p></li>
  759. </ul>
  760. </section>
  761. <section id="imagetransparencybg">
  762. <h2>imageTransparencyBG<a class="headerlink" href="#imagetransparencybg" title="Link to this heading"></a></h2>
  763. <p><strong>Deprecated:</strong> 5.0.0 use QROptions::$transparencyColor instead</p>
  764. <p><strong>See also:</strong></p>
  765. <ul class="simple">
  766. <li><p><code class="docutils literal notranslate">&#160;&#160;&#160;&#160;&#160;&#160; <span class="pre">\chillerlan\QRCode\QROptions::$transparencyColor</span></code></p></li>
  767. </ul>
  768. </section>
  769. <section id="imagickbg">
  770. <h2>imagickBG<a class="headerlink" href="#imagickbg" title="Link to this heading"></a></h2>
  771. <p><strong>Deprecated:</strong> 5.0.0 use QROptions::$bgColor instead</p>
  772. <p><strong>See also:</strong></p>
  773. <ul class="simple">
  774. <li><p><code class="docutils literal notranslate">&#160;&#160;&#160;&#160;&#160;&#160; <span class="pre">\chillerlan\QRCode\QROptions::$bgColor</span></code></p></li>
  775. </ul>
  776. </section>
  777. </section>
  778. </div>
  779. </div>
  780. <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
  781. <a href="Advanced-usage.html" class="btn btn-neutral float-left" title="Advanced usage" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
  782. <a href="../Customizing/Module-Values.html" class="btn btn-neutral float-right" title="Module values" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
  783. </div>
  784. <hr/>
  785. <div role="contentinfo">
  786. <p>&#169; Copyright 2023, smiley.</p>
  787. </div>
  788. </footer>
  789. </div>
  790. </div>
  791. </section>
  792. </div>
  793. <script>
  794. jQuery(function () {
  795. SphinxRtdTheme.Navigation.enable(true);
  796. });
  797. </script>
  798. </body>
  799. </html>