Configuration-settings.html 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. <!DOCTYPE html>
  2. <html class="writer-html5" lang="en" data-content_root="../">
  3. <head>
  4. <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
  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" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
  9. <link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=e59714d7" />
  10. <script src="../_static/jquery.js?v=5d32c60e"></script>
  11. <script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
  12. <script src="../_static/documentation_options.js?v=a8da1a53"></script>
  13. <script src="../_static/doctools.js?v=9bcbadda"></script>
  14. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  15. <script src="../_static/js/theme.js"></script>
  16. <link rel="index" title="Index" href="../genindex.html" />
  17. <link rel="search" title="Search" href="../search.html" />
  18. <link rel="next" title="Reading QR Codes" href="Reading-QRCodes.html" />
  19. <link rel="prev" title="Advanced usage" href="Advanced-usage.html" />
  20. </head>
  21. <body class="wy-body-for-nav">
  22. <div class="wy-grid-for-nav">
  23. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  24. <div class="wy-side-scroll">
  25. <div class="wy-side-nav-search" >
  26. <a href="../index.html" class="icon icon-home">
  27. PHP-QRCode
  28. </a>
  29. <div role="search">
  30. <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
  31. <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
  32. <input type="hidden" name="check_keywords" value="yes" />
  33. <input type="hidden" name="area" value="default" />
  34. </form>
  35. </div>
  36. </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
  37. <p class="caption" role="heading"><span class="caption-text">Usage</span></p>
  38. <ul class="current">
  39. <li class="toctree-l1"><a class="reference internal" href="Overview.html">Overview</a><ul>
  40. <li class="toctree-l2"><a class="reference internal" href="Overview.html#features">Features</a></li>
  41. <li class="toctree-l2"><a class="reference internal" href="Overview.html#requirements">Requirements</a></li>
  42. <li class="toctree-l2"><a class="reference internal" href="Overview.html#framework-integration">Framework Integration</a></li>
  43. <li class="toctree-l2"><a class="reference internal" href="Overview.html#shameless-advertising">Shameless advertising</a></li>
  44. </ul>
  45. </li>
  46. <li class="toctree-l1"><a class="reference internal" href="Installation.html">Installation</a><ul>
  47. <li class="toctree-l2"><a class="reference internal" href="Installation.html#installation-with-composer">Installation with Composer</a><ul>
  48. <li class="toctree-l3"><a class="reference internal" href="Installation.html#composer-json">composer.json</a><ul>
  49. <li class="toctree-l4"><a class="reference internal" href="Installation.html#version-switch">Version switch</a></li>
  50. </ul>
  51. </li>
  52. <li class="toctree-l3"><a class="reference internal" href="Installation.html#terminal">Terminal</a></li>
  53. </ul>
  54. </li>
  55. <li class="toctree-l2"><a class="reference internal" href="Installation.html#manual-installation">Manual installation</a><ul>
  56. <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>
  57. </ul>
  58. </li>
  59. <li class="toctree-l2"><a class="reference internal" href="Installation.html#supported-php-versions-extension-requirements">Supported PHP versions &amp; extension requirements</a></li>
  60. <li class="toctree-l2"><a class="reference internal" href="Installation.html#imagemagick">ImageMagick</a></li>
  61. </ul>
  62. </li>
  63. <li class="toctree-l1"><a class="reference internal" href="Quickstart.html">Quickstart</a><ul>
  64. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#import-the-library">Import the library</a></li>
  65. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#create-your-first-qr-code">Create your first QR Code</a><ul>
  66. <li class="toctree-l3"><a class="reference internal" href="Quickstart.html#configuration">Configuration</a></li>
  67. </ul>
  68. </li>
  69. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#notes">Notes</a></li>
  70. </ul>
  71. </li>
  72. <li class="toctree-l1"><a class="reference internal" href="Advanced-usage.html">Advanced usage</a><ul>
  73. <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>
  74. <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>
  75. <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>
  76. <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>
  77. </ul>
  78. </li>
  79. <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>
  80. <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>
  81. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#mixed-mode">Mixed mode</a></li>
  82. </ul>
  83. </li>
  84. <li class="toctree-l2"><a class="reference internal" href="Advanced-usage.html#common-output-options">Common output options</a><ul>
  85. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#save-to-file">Save to file</a></li>
  86. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#base64-uri-output">Base64 URI output</a></li>
  87. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#return-the-image-resource">Return the image resource</a></li>
  88. </ul>
  89. </li>
  90. </ul>
  91. </li>
  92. <li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration settings</a><ul>
  93. <li class="toctree-l2"><a class="reference internal" href="#version">version</a></li>
  94. <li class="toctree-l2"><a class="reference internal" href="#versionmin">versionMin</a></li>
  95. <li class="toctree-l2"><a class="reference internal" href="#versionmax">versionMax</a></li>
  96. <li class="toctree-l2"><a class="reference internal" href="#ecclevel">eccLevel</a></li>
  97. <li class="toctree-l2"><a class="reference internal" href="#maskpattern">maskPattern</a></li>
  98. <li class="toctree-l2"><a class="reference internal" href="#addquietzone">addQuietzone</a></li>
  99. <li class="toctree-l2"><a class="reference internal" href="#quietzonesize">quietzoneSize</a></li>
  100. <li class="toctree-l2"><a class="reference internal" href="#outputinterface">outputInterface</a></li>
  101. <li class="toctree-l2"><a class="reference internal" href="#returnresource">returnResource</a></li>
  102. <li class="toctree-l2"><a class="reference internal" href="#cachefile">cachefile</a></li>
  103. <li class="toctree-l2"><a class="reference internal" href="#outputbase64">outputBase64</a></li>
  104. <li class="toctree-l2"><a class="reference internal" href="#eol">eol</a></li>
  105. <li class="toctree-l2"><a class="reference internal" href="#bgcolor">bgColor</a></li>
  106. <li class="toctree-l2"><a class="reference internal" href="#invertmatrix">invertMatrix</a></li>
  107. <li class="toctree-l2"><a class="reference internal" href="#drawlightmodules">drawLightModules</a></li>
  108. <li class="toctree-l2"><a class="reference internal" href="#drawcircularmodules">drawCircularModules</a></li>
  109. <li class="toctree-l2"><a class="reference internal" href="#circleradius">circleRadius</a></li>
  110. <li class="toctree-l2"><a class="reference internal" href="#keepassquare">keepAsSquare</a></li>
  111. <li class="toctree-l2"><a class="reference internal" href="#connectpaths">connectPaths</a></li>
  112. <li class="toctree-l2"><a class="reference internal" href="#excludefromconnect">excludeFromConnect</a></li>
  113. <li class="toctree-l2"><a class="reference internal" href="#modulevalues">moduleValues</a></li>
  114. <li class="toctree-l2"><a class="reference internal" href="#addlogospace">addLogoSpace</a></li>
  115. <li class="toctree-l2"><a class="reference internal" href="#logospacewidth">logoSpaceWidth</a></li>
  116. <li class="toctree-l2"><a class="reference internal" href="#logospaceheight">logoSpaceHeight</a></li>
  117. <li class="toctree-l2"><a class="reference internal" href="#logospacestartx">logoSpaceStartX</a></li>
  118. <li class="toctree-l2"><a class="reference internal" href="#logospacestarty">logoSpaceStartY</a></li>
  119. <li class="toctree-l2"><a class="reference internal" href="#scale">scale</a></li>
  120. <li class="toctree-l2"><a class="reference internal" href="#imagetransparent">imageTransparent</a></li>
  121. <li class="toctree-l2"><a class="reference internal" href="#transparencycolor">transparencyColor</a></li>
  122. <li class="toctree-l2"><a class="reference internal" href="#quality">quality</a></li>
  123. <li class="toctree-l2"><a class="reference internal" href="#gdimageuseupscale">gdImageUseUpscale</a></li>
  124. <li class="toctree-l2"><a class="reference internal" href="#imagickformat">imagickFormat</a></li>
  125. <li class="toctree-l2"><a class="reference internal" href="#cssclass">cssClass</a></li>
  126. <li class="toctree-l2"><a class="reference internal" href="#svgaddxmlheader">svgAddXmlHeader</a></li>
  127. <li class="toctree-l2"><a class="reference internal" href="#svgdefs">svgDefs</a></li>
  128. <li class="toctree-l2"><a class="reference internal" href="#svgpreserveaspectratio">svgPreserveAspectRatio</a></li>
  129. <li class="toctree-l2"><a class="reference internal" href="#svgusefillattributes">svgUseFillAttributes</a></li>
  130. <li class="toctree-l2"><a class="reference internal" href="#textlinestart">textLineStart</a></li>
  131. <li class="toctree-l2"><a class="reference internal" href="#jsonflags">jsonFlags</a></li>
  132. <li class="toctree-l2"><a class="reference internal" href="#fpdfmeasureunit">fpdfMeasureUnit</a></li>
  133. <li class="toctree-l2"><a class="reference internal" href="#xmlstylesheet">xmlStylesheet</a></li>
  134. <li class="toctree-l2"><a class="reference internal" href="#readeruseimagickifavailable">readerUseImagickIfAvailable</a></li>
  135. <li class="toctree-l2"><a class="reference internal" href="#readergrayscale">readerGrayscale</a></li>
  136. <li class="toctree-l2"><a class="reference internal" href="#readerinvertcolors">readerInvertColors</a></li>
  137. <li class="toctree-l2"><a class="reference internal" href="#readerincreasecontrast">readerIncreaseContrast</a></li>
  138. </ul>
  139. </li>
  140. <li class="toctree-l1"><a class="reference internal" href="Reading-QRCodes.html">Reading QR Codes</a><ul>
  141. <li class="toctree-l2"><a class="reference internal" href="Reading-QRCodes.html#basic-usage">Basic usage</a></li>
  142. <li class="toctree-l2"><a class="reference internal" href="Reading-QRCodes.html#the-luminancesourceinterface">The <code class="docutils literal notranslate"><span class="pre">LuminanceSourceInterface</span></code></a></li>
  143. <li class="toctree-l2"><a class="reference internal" href="Reading-QRCodes.html#the-decoder">The <code class="docutils literal notranslate"><span class="pre">Decoder</span></code></a></li>
  144. <li class="toctree-l2"><a class="reference internal" href="Reading-QRCodes.html#general-considerations">General considerations</a></li>
  145. </ul>
  146. </li>
  147. <li class="toctree-l1"><a class="reference internal" href="Logos.html">Logos and logo space</a><ul>
  148. <li class="toctree-l2"><a class="reference internal" href="Logos.html#info">Info</a></li>
  149. <li class="toctree-l2"><a class="reference internal" href="Logos.html#adding-a-logo-space">Adding a logo space</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 Classes</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-class">Options that affect this class</a></li>
  202. </ul>
  203. </li>
  204. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRFpdf.html">QRFpdf</a><ul>
  205. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#example">Example</a></li>
  206. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#additional-methods">Additional methods</a></li>
  207. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#options-that-affect-this-class">Options that affect this class</a></li>
  208. </ul>
  209. </li>
  210. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRGdImage.html">QRGdImage</a><ul>
  211. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#example">Example</a></li>
  212. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#additional-methods">Additional methods</a></li>
  213. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#options-that-affect-this-class">Options that affect this class</a></li>
  214. </ul>
  215. </li>
  216. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRImagick.html">QRImagick</a><ul>
  217. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#example">Example</a></li>
  218. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#additional-methods">Additional methods</a></li>
  219. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#options-that-affect-this-class">Options that affect this class</a></li>
  220. </ul>
  221. </li>
  222. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRInterventionImage.html">QRInterventionImage</a><ul>
  223. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRInterventionImage.html#example">Example</a></li>
  224. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRInterventionImage.html#additional-methods">Additional methods</a></li>
  225. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRInterventionImage.html#options-that-affect-this-class">Options that affect this class</a></li>
  226. </ul>
  227. </li>
  228. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html">QRMarkupHTML</a><ul>
  229. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#example">Example</a></li>
  230. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#additional-methods">Additional methods</a></li>
  231. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#options-that-affect-this-class">Options that affect this class</a></li>
  232. </ul>
  233. </li>
  234. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html">QRMarkupSVG</a><ul>
  235. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#example">Example</a></li>
  236. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#additional-methods">Additional methods</a></li>
  237. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#options-that-affect-this-class">Options that affect this class</a></li>
  238. </ul>
  239. </li>
  240. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupXML.html">QRMarkupXML</a><ul>
  241. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupXML.html#example">Example</a></li>
  242. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupXML.html#additional-methods">Additional methods</a></li>
  243. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupXML.html#options-that-affect-this-class">Options that affect this class</a></li>
  244. </ul>
  245. </li>
  246. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRStringJSON.html">QRStringJSON</a><ul>
  247. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRStringJSON.html#example">Example</a></li>
  248. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRStringJSON.html#previous-functionality">Previous functionality</a></li>
  249. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRStringJSON.html#additional-methods">Additional methods</a></li>
  250. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRStringJSON.html#options-that-affect-this-class">Options that affect this class</a></li>
  251. </ul>
  252. </li>
  253. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRStringText.html">QRStringText</a><ul>
  254. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRStringText.html#example">Example</a></li>
  255. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRStringText.html#additional-methods">Additional methods</a></li>
  256. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRStringText.html#options-that-affect-this-class">Options that affect this class</a></li>
  257. </ul>
  258. </li>
  259. </ul>
  260. <p class="caption" role="heading"><span class="caption-text">Appendix</span></p>
  261. <ul>
  262. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Terminology.html">Terminology</a><ul>
  263. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#qr-code">QR Code</a></li>
  264. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#matrix">Matrix</a><ul>
  265. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#module">Module</a></li>
  266. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#version">Version</a></li>
  267. </ul>
  268. </li>
  269. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#function-patterns">Function Patterns</a><ul>
  270. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#finder-pattern">Finder Pattern</a></li>
  271. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#alignment-pattern">Alignment Pattern</a></li>
  272. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#timing-pattern">Timing Pattern</a></li>
  273. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#separators">Separators</a></li>
  274. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#quiet-zone">Quiet Zone</a></li>
  275. </ul>
  276. </li>
  277. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#encoding-region">Encoding Region</a><ul>
  278. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#data">Data</a></li>
  279. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#version-information">Version Information</a></li>
  280. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#format-information">Format Information</a></li>
  281. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#darkmodule">Darkmodule</a></li>
  282. </ul>
  283. </li>
  284. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#mode">Mode</a><ul>
  285. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#segment">Segment</a></li>
  286. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#extended-channel-interpretation-eci">Extended Channel Interpretation (ECI)</a></li>
  287. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#mixed-mode">Mixed Mode</a></li>
  288. </ul>
  289. </li>
  290. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#ecc-error-correction-coding">ECC (Error Correction Coding)</a><ul>
  291. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#ecc-level">ECC Level</a></li>
  292. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#maximum-data-capacity">Maximum data capacity</a></li>
  293. </ul>
  294. </li>
  295. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#data-masking">Data masking</a><ul>
  296. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#evaluation">Evaluation</a></li>
  297. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#mask-pattern">Mask pattern</a></li>
  298. </ul>
  299. </li>
  300. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#reflectance">Reflectance</a></li>
  301. </ul>
  302. </li>
  303. <li class="toctree-l1"><a class="reference internal" href="../Appendix/URI-Content.html">Popular content and URI schemes</a><ul>
  304. <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>
  305. <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>
  306. <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>
  307. <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>
  308. <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>
  309. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#wireless-network-configuration">Wireless Network configuration</a></li>
  310. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#contact-information-vcard">Contact information: vCard</a></li>
  311. <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>
  312. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#credit-transfer">Credit Transfer</a><ul>
  313. <li class="toctree-l3"><a class="reference internal" href="../Appendix/URI-Content.html#sepa-european-payments-council">SEPA (European Payments Council)</a></li>
  314. <li class="toctree-l3"><a class="reference internal" href="../Appendix/URI-Content.html#pix-banco-central-do-brasil">Pix (Banco Central do Brasil)</a></li>
  315. </ul>
  316. </li>
  317. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#see-also">See also</a></li>
  318. </ul>
  319. </li>
  320. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Performance-considerations.html">Performance considerations</a><ul>
  321. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#version">Version</a></li>
  322. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#ecc-level">Ecc level</a></li>
  323. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#data-mode">Data mode</a></li>
  324. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#mask-pattern">Mask pattern</a></li>
  325. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Performance-considerations.html#output">Output</a></li>
  326. </ul>
  327. </li>
  328. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Contribute.html">How to contribute</a><ul>
  329. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#questions-and-issues">Questions and issues</a></li>
  330. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#bug-reports">Bug reports</a></li>
  331. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#pull-requests-and-bug-fixes">Pull requests and bug fixes</a></li>
  332. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#documentation">Documentation</a></li>
  333. </ul>
  334. </li>
  335. <li class="toctree-l1"><a class="reference internal" href="../Appendix/License.html">License</a></li>
  336. </ul>
  337. </div>
  338. </div>
  339. </nav>
  340. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
  341. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  342. <a href="../index.html">PHP-QRCode</a>
  343. </nav>
  344. <div class="wy-nav-content">
  345. <div class="rst-content">
  346. <div role="navigation" aria-label="Page navigation">
  347. <ul class="wy-breadcrumbs">
  348. <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
  349. <li class="breadcrumb-item active">Configuration settings</li>
  350. <li class="wy-breadcrumbs-aside">
  351. <a href="https://github.com/chillerlan/php-qrcode/blob/main/docs/Usage/Configuration-settings.md" class="fa fa-github"> Edit on GitHub</a>
  352. </li>
  353. </ul>
  354. <hr/>
  355. </div>
  356. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  357. <div itemprop="articleBody">
  358. <section id="configuration-settings">
  359. <h1>Configuration settings<a class="headerlink" href="#configuration-settings" title="Link to this heading"></a></h1>
  360. <!-- This file is auto generated from the source of QROptions.php -->
  361. <section id="version">
  362. <h2>version<a class="headerlink" href="#version" title="Link to this heading"></a></h2>
  363. <p>QR Code version number</p>
  364. <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>
  365. <p><strong>See also:</strong></p>
  366. <ul class="simple">
  367. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\Version</span></code></p></li>
  368. </ul>
  369. </section>
  370. <section id="versionmin">
  371. <h2>versionMin<a class="headerlink" href="#versionmin" title="Link to this heading"></a></h2>
  372. <p>Minimum QR version</p>
  373. <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>
  374. </section>
  375. <section id="versionmax">
  376. <h2>versionMax<a class="headerlink" href="#versionmax" title="Link to this heading"></a></h2>
  377. <p>Maximum QR version</p>
  378. <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>
  379. </section>
  380. <section id="ecclevel">
  381. <h2>eccLevel<a class="headerlink" href="#ecclevel" title="Link to this heading"></a></h2>
  382. <p>Error correct level</p>
  383. <p>the constant <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>
  384. <ul class="simple">
  385. <li><p><code class="docutils literal notranslate"><span class="pre">L</span></code> =&gt; 7% (default)</p></li>
  386. <li><p><code class="docutils literal notranslate"><span class="pre">M</span></code> =&gt; 15%</p></li>
  387. <li><p><code class="docutils literal notranslate"><span class="pre">Q</span></code> =&gt; 25%</p></li>
  388. <li><p><code class="docutils literal notranslate"><span class="pre">H</span></code> =&gt; 30%</p></li>
  389. </ul>
  390. <p>alternatively you can just pass the letters L/M/Q/H (case-insensitive) to the magic setter</p>
  391. <p><strong>See also:</strong></p>
  392. <ul class="simple">
  393. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\EccLevel</span></code></p></li>
  394. <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>
  395. </ul>
  396. </section>
  397. <section id="maskpattern">
  398. <h2>maskPattern<a class="headerlink" href="#maskpattern" title="Link to this heading"></a></h2>
  399. <p>Mask Pattern to use (no value in using, mostly for unit testing purposes)</p>
  400. <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>
  401. <p><strong>See also:</strong></p>
  402. <ul class="simple">
  403. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\MaskPattern</span></code></p></li>
  404. </ul>
  405. </section>
  406. <section id="addquietzone">
  407. <h2>addQuietzone<a class="headerlink" href="#addquietzone" title="Link to this heading"></a></h2>
  408. <p>Add a “quiet zone” (margin) according to the QR code spec</p>
  409. <p><strong>See also:</strong></p>
  410. <ul class="simple">
  411. <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>
  412. </ul>
  413. </section>
  414. <section id="quietzonesize">
  415. <h2>quietzoneSize<a class="headerlink" href="#quietzonesize" title="Link to this heading"></a></h2>
  416. <p>Size of the quiet zone</p>
  417. <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>
  418. </section>
  419. <section id="outputinterface">
  420. <h2>outputInterface<a class="headerlink" href="#outputinterface" title="Link to this heading"></a></h2>
  421. <p>The FQCN of the <code class="docutils literal notranslate"><span class="pre">QROutputInterface</span></code> to use</p>
  422. </section>
  423. <section id="returnresource">
  424. <h2>returnResource<a class="headerlink" href="#returnresource" title="Link to this heading"></a></h2>
  425. <p>Return the image resource instead of a render if applicable.</p>
  426. <ul class="simple">
  427. <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>
  428. <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>
  429. <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>
  430. </ul>
  431. <p>This option overrides/ignores other output settings, such as <code class="docutils literal notranslate"><span class="pre">QROptions::$cachefile</span></code>
  432. 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>
  433. <p><strong>See also:</strong></p>
  434. <ul class="simple">
  435. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputInterface::dump()</span></code></p></li>
  436. </ul>
  437. </section>
  438. <section id="cachefile">
  439. <h2>cachefile<a class="headerlink" href="#cachefile" title="Link to this heading"></a></h2>
  440. <p>Optional cache file path <code class="docutils literal notranslate"><span class="pre">/path/to/cache.file</span></code></p>
  441. <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>
  442. 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>
  443. <p><strong>See also:</strong></p>
  444. <ul class="simple">
  445. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::render()</span></code></p></li>
  446. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::renderMatrix()</span></code></p></li>
  447. </ul>
  448. </section>
  449. <section id="outputbase64">
  450. <h2>outputBase64<a class="headerlink" href="#outputbase64" title="Link to this heading"></a></h2>
  451. <p>Toggle base64 data URI or raw data output (if applicable)</p>
  452. <p>(default: <code class="docutils literal notranslate"><span class="pre">true</span></code>)</p>
  453. <p><strong>See also:</strong></p>
  454. <ul class="simple">
  455. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::toBase64DataURI()</span></code></p></li>
  456. </ul>
  457. </section>
  458. <section id="eol">
  459. <h2>eol<a class="headerlink" href="#eol" title="Link to this heading"></a></h2>
  460. <p>Newline string</p>
  461. <p>(default: <code class="docutils literal notranslate"><span class="pre">PHP_EOL</span></code>)</p>
  462. </section>
  463. <section id="bgcolor">
  464. <h2>bgColor<a class="headerlink" href="#bgcolor" title="Link to this heading"></a></h2>
  465. <p>Sets the image background color (if applicable)</p>
  466. <ul class="simple">
  467. <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>
  468. <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>
  469. <li><p><code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>: defaults to blank internally (white page)</p></li>
  470. </ul>
  471. </section>
  472. <section id="invertmatrix">
  473. <h2>invertMatrix<a class="headerlink" href="#invertmatrix" title="Link to this heading"></a></h2>
  474. <p>Whether to invert the matrix (reflectance reversal)</p>
  475. <p>(default: <code class="docutils literal notranslate"><span class="pre">false</span></code>)</p>
  476. <p><strong>See also:</strong></p>
  477. <ul class="simple">
  478. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Data\QRMatrix::invert()</span></code></p></li>
  479. </ul>
  480. </section>
  481. <section id="drawlightmodules">
  482. <h2>drawLightModules<a class="headerlink" href="#drawlightmodules" title="Link to this heading"></a></h2>
  483. <p>Whether to draw the light (false) modules</p>
  484. <p>(default: <code class="docutils literal notranslate"><span class="pre">true</span></code>)</p>
  485. </section>
  486. <section id="drawcircularmodules">
  487. <h2>drawCircularModules<a class="headerlink" href="#drawcircularmodules" title="Link to this heading"></a></h2>
  488. <p>Specify whether to draw the modules as filled circles</p>
  489. <p>a note for <code class="docutils literal notranslate"><span class="pre">GdImage</span></code> output:</p>
  490. <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
  491. using <code class="docutils literal notranslate"><span class="pre">imagefilledellipse()</span></code> and then scaled back to the expected size</p>
  492. <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>
  493. <p><strong>See also:</strong></p>
  494. <ul class="simple">
  495. <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>
  496. <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>
  497. <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>
  498. </ul>
  499. </section>
  500. <section id="circleradius">
  501. <h2>circleRadius<a class="headerlink" href="#circleradius" title="Link to this heading"></a></h2>
  502. <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>
  503. <p>(default: 0.45)</p>
  504. </section>
  505. <section id="keepassquare">
  506. <h2>keepAsSquare<a class="headerlink" href="#keepassquare" title="Link to this heading"></a></h2>
  507. <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>
  508. <p>(default: <code class="docutils literal notranslate"><span class="pre">[]</span></code>)</p>
  509. </section>
  510. <section id="connectpaths">
  511. <h2>connectPaths<a class="headerlink" href="#connectpaths" title="Link to this heading"></a></h2>
  512. <p>Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc.</p>
  513. <p>This option is exclusive to output classes that use the module collector <code class="docutils literal notranslate"><span class="pre">QROutputAbstract::collectModules()</span></code>,
  514. which converts the <code class="docutils literal notranslate"><span class="pre">$M_TYPE</span></code> of all modules to <code class="docutils literal notranslate"><span class="pre">QRMatrix::M_DATA</span></code> and <code class="docutils literal notranslate"><span class="pre">QRMatrix::M_DATA_DARK</span></code> respectively.</p>
  515. <p>Module types that should not be added to the connected path can be excluded via <code class="docutils literal notranslate"><span class="pre">QROptions::$excludeFromConnect</span></code>.</p>
  516. <p>Currentty used in <code class="docutils literal notranslate"><span class="pre">QREps</span></code> and <code class="docutils literal notranslate"><span class="pre">QRMarkupSVG</span></code>.</p>
  517. <p><strong>See also:</strong></p>
  518. <ul class="simple">
  519. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::collectModules()</span></code></p></li>
  520. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QROptionsTrait::$excludeFromConnect</span></code></p></li>
  521. <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>
  522. </ul>
  523. </section>
  524. <section id="excludefromconnect">
  525. <h2>excludeFromConnect<a class="headerlink" href="#excludefromconnect" title="Link to this heading"></a></h2>
  526. <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>
  527. <p><strong>See also:</strong></p>
  528. <ul class="simple">
  529. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QROptionsTrait::$connectPaths</span></code></p></li>
  530. </ul>
  531. </section>
  532. <section id="modulevalues">
  533. <h2>moduleValues<a class="headerlink" href="#modulevalues" title="Link to this heading"></a></h2>
  534. <p>Module values map</p>
  535. <ul class="simple">
  536. <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>
  537. <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>
  538. <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>
  539. </ul>
  540. <p><strong>See also:</strong></p>
  541. <ul class="simple">
  542. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::setModuleValues()</span></code></p></li>
  543. </ul>
  544. </section>
  545. <section id="addlogospace">
  546. <h2>addLogoSpace<a class="headerlink" href="#addlogospace" title="Link to this heading"></a></h2>
  547. <p>Toggles logo space creation</p>
  548. <p><strong>See also:</strong></p>
  549. <ul class="simple">
  550. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::addMatrixModifications()</span></code></p></li>
  551. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Data\QRMatrix::setLogoSpace()</span></code></p></li>
  552. </ul>
  553. </section>
  554. <section id="logospacewidth">
  555. <h2>logoSpaceWidth<a class="headerlink" href="#logospacewidth" title="Link to this heading"></a></h2>
  556. <p>Width of the logo space</p>
  557. <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>
  558. </section>
  559. <section id="logospaceheight">
  560. <h2>logoSpaceHeight<a class="headerlink" href="#logospaceheight" title="Link to this heading"></a></h2>
  561. <p>Height of the logo space</p>
  562. <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>
  563. </section>
  564. <section id="logospacestartx">
  565. <h2>logoSpaceStartX<a class="headerlink" href="#logospacestartx" title="Link to this heading"></a></h2>
  566. <p>Optional horizontal start position of the logo space (top left corner)</p>
  567. </section>
  568. <section id="logospacestarty">
  569. <h2>logoSpaceStartY<a class="headerlink" href="#logospacestarty" title="Link to this heading"></a></h2>
  570. <p>Optional vertical start position of the logo space (top left corner)</p>
  571. </section>
  572. <section id="scale">
  573. <h2>scale<a class="headerlink" href="#scale" title="Link to this heading"></a></h2>
  574. <p>Pixel size of a QR code module</p>
  575. </section>
  576. <section id="imagetransparent">
  577. <h2>imageTransparent<a class="headerlink" href="#imagetransparent" title="Link to this heading"></a></h2>
  578. <p>Toggle transparency</p>
  579. <ul class="simple">
  580. <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>
  581. </ul>
  582. <p><strong>See also:</strong></p>
  583. <ul class="simple">
  584. <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>
  585. </ul>
  586. </section>
  587. <section id="transparencycolor">
  588. <h2>transparencyColor<a class="headerlink" href="#transparencycolor" title="Link to this heading"></a></h2>
  589. <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>
  590. <p>Defaults to <code class="docutils literal notranslate"><span class="pre">QROptions::$bgColor</span></code>.</p>
  591. <ul class="simple">
  592. <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>
  593. <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>
  594. </ul>
  595. <p><strong>See also:</strong></p>
  596. <ul class="simple">
  597. <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>
  598. <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>
  599. </ul>
  600. </section>
  601. <section id="quality">
  602. <h2>quality<a class="headerlink" href="#quality" title="Link to this heading"></a></h2>
  603. <p>Compression quality</p>
  604. <p>The given value depends on the used output type:</p>
  605. <ul class="simple">
  606. <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>
  607. <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>
  608. <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>
  609. <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>
  610. <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>
  611. </ul>
  612. <p><strong>See also:</strong></p>
  613. <ul class="simple">
  614. <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>
  615. <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>
  616. <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>
  617. <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>
  618. <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>
  619. </ul>
  620. </section>
  621. <section id="gdimageuseupscale">
  622. <h2>gdImageUseUpscale<a class="headerlink" href="#gdimageuseupscale" title="Link to this heading"></a></h2>
  623. <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
  624. <code class="docutils literal notranslate"><span class="pre">QROptions::$scale</span></code> is less than 20</p>
  625. <p><strong>See also:</strong></p>
  626. <ul class="simple">
  627. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRGdImage::createImage()</span></code></p></li>
  628. <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>
  629. </ul>
  630. </section>
  631. <section id="imagickformat">
  632. <h2>imagickFormat<a class="headerlink" href="#imagickformat" title="Link to this heading"></a></h2>
  633. <p>Imagick output format</p>
  634. <p><strong>See also:</strong></p>
  635. <ul class="simple">
  636. <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>
  637. <li><p><a class="reference external" href="https://www.imagemagick.org/script/formats.php">www.imagemagick.org/script/formats.php</a></p></li>
  638. </ul>
  639. </section>
  640. <section id="cssclass">
  641. <h2>cssClass<a class="headerlink" href="#cssclass" title="Link to this heading"></a></h2>
  642. <p>A common css class</p>
  643. </section>
  644. <section id="svgaddxmlheader">
  645. <h2>svgAddXmlHeader<a class="headerlink" href="#svgaddxmlheader" title="Link to this heading"></a></h2>
  646. <p>Whether to add an XML header line or not, e.g. to embed the SVG directly in HTML</p>
  647. <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>
  648. </section>
  649. <section id="svgdefs">
  650. <h2>svgDefs<a class="headerlink" href="#svgdefs" title="Link to this heading"></a></h2>
  651. <p>Anything in the SVG <code class="docutils literal notranslate"><span class="pre">&lt;defs&gt;</span></code> tag</p>
  652. <p><strong>See also:</strong></p>
  653. <ul class="simple">
  654. <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>
  655. </ul>
  656. </section>
  657. <section id="svgpreserveaspectratio">
  658. <h2>svgPreserveAspectRatio<a class="headerlink" href="#svgpreserveaspectratio" title="Link to this heading"></a></h2>
  659. <p>Sets the value for the “preserveAspectRatio” on the <code class="docutils literal notranslate"><span class="pre">&lt;svg&gt;</span></code> element</p>
  660. <p><strong>See also:</strong></p>
  661. <ul class="simple">
  662. <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>
  663. </ul>
  664. </section>
  665. <section id="svgusefillattributes">
  666. <h2>svgUseFillAttributes<a class="headerlink" href="#svgusefillattributes" title="Link to this heading"></a></h2>
  667. <p>Whether to use the SVG <code class="docutils literal notranslate"><span class="pre">fill</span></code> attributes</p>
  668. <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>.
  669. 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>
  670. <p><strong>See also:</strong></p>
  671. <ul class="simple">
  672. <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>
  673. </ul>
  674. </section>
  675. <section id="textlinestart">
  676. <h2>textLineStart<a class="headerlink" href="#textlinestart" title="Link to this heading"></a></h2>
  677. <p>An optional line prefix, e.g. empty space to align the QR Code in a console</p>
  678. </section>
  679. <section id="jsonflags">
  680. <h2>jsonFlags<a class="headerlink" href="#jsonflags" title="Link to this heading"></a></h2>
  681. <p>Sets the flags to use for the <code class="docutils literal notranslate"><span class="pre">json_encode()</span></code> call</p>
  682. <p><strong>See also:</strong></p>
  683. <ul class="simple">
  684. <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>
  685. </ul>
  686. </section>
  687. <section id="fpdfmeasureunit">
  688. <h2>fpdfMeasureUnit<a class="headerlink" href="#fpdfmeasureunit" title="Link to this heading"></a></h2>
  689. <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>
  690. <p><strong>See also:</strong></p>
  691. <ul class="simple">
  692. <li><p><code class="docutils literal notranslate"><span class="pre">FPDF::__construct()</span></code></p></li>
  693. </ul>
  694. </section>
  695. <section id="xmlstylesheet">
  696. <h2>xmlStylesheet<a class="headerlink" href="#xmlstylesheet" title="Link to this heading"></a></h2>
  697. <p>Sets an optional XSLT stylesheet in the XML output</p>
  698. <p><strong>See also:</strong></p>
  699. <ul class="simple">
  700. <li><p><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/XSLT">developer.mozilla.org/en-US/docs/Web/XSLT</a></p></li>
  701. </ul>
  702. </section>
  703. <section id="readeruseimagickifavailable">
  704. <h2>readerUseImagickIfAvailable<a class="headerlink" href="#readeruseimagickifavailable" title="Link to this heading"></a></h2>
  705. <p>Use Imagick (if available) when reading QR Codes</p>
  706. </section>
  707. <section id="readergrayscale">
  708. <h2>readerGrayscale<a class="headerlink" href="#readergrayscale" title="Link to this heading"></a></h2>
  709. <p>Grayscale the image before reading</p>
  710. </section>
  711. <section id="readerinvertcolors">
  712. <h2>readerInvertColors<a class="headerlink" href="#readerinvertcolors" title="Link to this heading"></a></h2>
  713. <p>Invert the colors of the image</p>
  714. </section>
  715. <section id="readerincreasecontrast">
  716. <h2>readerIncreaseContrast<a class="headerlink" href="#readerincreasecontrast" title="Link to this heading"></a></h2>
  717. <p>Increase the contrast before reading</p>
  718. <p>note that applying contrast works different in GD and Imagick, so mileage may vary</p>
  719. </section>
  720. </section>
  721. </div>
  722. </div>
  723. <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
  724. <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>
  725. <a href="Reading-QRCodes.html" class="btn btn-neutral float-right" title="Reading QR Codes" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
  726. </div>
  727. <hr/>
  728. <div role="contentinfo">
  729. <p>&#169; Copyright 2025, smiley.</p>
  730. </div>
  731. </footer>
  732. </div>
  733. </div>
  734. </section>
  735. </div>
  736. <script>
  737. jQuery(function () {
  738. SphinxRtdTheme.Navigation.enable(true);
  739. });
  740. </script>
  741. </body>
  742. </html>