Skip to content

Commit 8918e1f

Browse files
Merge pull request #51 from Keillion/master
doc
2 parents 5514823 + 4f966ca commit 8918e1f

File tree

4 files changed

+397
-25
lines changed

4 files changed

+397
-25
lines changed

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Dynamsoft.BarcodeReader.productKeys = 'PRODUCT-KEYS';
121121
| Patch Code | **X** | √ |
122122
| GS1 Composite Code | **X** | √ |
123123
| GS1 DataBar | **X** | √ |
124+
| Postal Code | **X** | √ |
124125
| DPM | **X** | √ |
125126
| getRuntimeSettings | √ | √ |
126127
| updateRuntimeSettings | √ | √ |
@@ -563,17 +564,19 @@ For commercial usage, we highly recommend self-hosted deployment. The following
563564
* **Step one**: Place the files
564565

565566

566-
Create a directory called `dist` on your server and put the following files in there.
567+
On your server put the following files in the same directory.
567568

568569
> [Download zip](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js) to get these files.
569570
570571
```
571-
dbr-<version>.js
572-
dbr-<version>.worker.js
573-
dbr-<version>.wasm.js
574-
dbr-<version>.wasm
575-
dbr-<version>.full.wasm.js
576-
dbr-<version>.full.wasm
572+
dbr.js // For <script>
573+
dbr.browser.mjs // For <script type="module">
574+
dbr.scanner.html // Scanner default UI
575+
dbr-<version>.worker.js // A worker thread for decoding
576+
dbr-<version>.wasm.js // Compact Editions
577+
dbr-<version>.wasm // Compact Editions
578+
dbr-<version>.full.wasm.js // Full Editions
579+
dbr-<version>.full.wasm // Full Editions
577580
```
578581

579582
* **Step two**: Configure the server
@@ -589,7 +592,12 @@ Create a directory called `dist` on your server and put the following files in t
589592
> * Java&trade; EE web app: [web.xml](https://github.com/dynamsoft-dbr/javascript-barcode/blob/dac614f8033661901d85381dfaff8d612115862a/documents/conf/web.xml)
590593
> * Node.js: [npm mime](https://github.com/broofa/node-mime)
591594
595+
* **Step three**: Configure the engineResourcePath
592596

597+
The `engineResourcePath` need to be set before `loadWasm`.
598+
```js
599+
Dynamsoft.BarcodeReader.engineResourcePath = "url/to/the/dir/";
600+
```
593601

594602
## Changelog
595603

doc/api reference/index.html

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ <h2>Features</h2>
241241
<td align="center"><strong>X</strong></td>
242242
<td align="center">&radic;</td>
243243
</tr>
244+
<tr>
245+
<td align="center">Postal Code</td>
246+
<td align="center"><strong>X</strong></td>
247+
<td align="center">&radic;</td>
248+
</tr>
244249
<tr>
245250
<td align="center">DPM</td>
246251
<td align="center"><strong>X</strong></td>
@@ -655,16 +660,18 @@ <h2>Self-hosted Deployment</h2>
655660
<ul>
656661
<li><strong>Step one</strong>: Place the files</li>
657662
</ul>
658-
<p>Create a directory called <code>dist</code> on your server and put the following files in there.</p>
663+
<p>On your server put the following files in the same directory.</p>
659664
<blockquote>
660665
<p><a href="https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js">Download zip</a> to get these files.</p>
661666
</blockquote>
662-
<pre><code> dbr-&lt;version&gt;<span class="hljs-selector-class">.js</span>
663-
dbr-&lt;version&gt;<span class="hljs-selector-class">.worker</span><span class="hljs-selector-class">.js</span>
664-
dbr-&lt;version&gt;<span class="hljs-selector-class">.wasm</span><span class="hljs-selector-class">.js</span>
665-
dbr-&lt;version&gt;<span class="hljs-selector-class">.wasm</span>
666-
dbr-&lt;version&gt;<span class="hljs-selector-class">.full</span><span class="hljs-selector-class">.wasm</span><span class="hljs-selector-class">.js</span>
667-
dbr-&lt;version&gt;<span class="hljs-selector-class">.full</span><span class="hljs-selector-class">.wasm</span></code></pre><ul>
667+
<pre><code> dbr<span class="hljs-selector-class">.js</span> <span class="hljs-comment">// For &lt;script&gt;</span>
668+
dbr<span class="hljs-selector-class">.browser</span><span class="hljs-selector-class">.mjs</span> <span class="hljs-comment">// For &lt;script type="module"&gt;</span>
669+
dbr<span class="hljs-selector-class">.scanner</span><span class="hljs-selector-class">.html</span> <span class="hljs-comment">// Scanner default UI</span>
670+
dbr-&lt;version&gt;<span class="hljs-selector-class">.worker</span><span class="hljs-selector-class">.js</span> <span class="hljs-comment">// A worker thread for decoding</span>
671+
dbr-&lt;version&gt;<span class="hljs-selector-class">.wasm</span><span class="hljs-selector-class">.js</span> <span class="hljs-comment">// Compact Editions</span>
672+
dbr-&lt;version&gt;<span class="hljs-selector-class">.wasm</span> <span class="hljs-comment">// Compact Editions</span>
673+
dbr-&lt;version&gt;<span class="hljs-selector-class">.full</span><span class="hljs-selector-class">.wasm</span><span class="hljs-selector-class">.js</span> <span class="hljs-comment">// Full Editions</span>
674+
dbr-&lt;version&gt;<span class="hljs-selector-class">.full</span><span class="hljs-selector-class">.wasm</span> <span class="hljs-comment">// Full Editions</span></code></pre><ul>
668675
<li><p><strong>Step two</strong>: Configure the server</p>
669676
<p>Make sure that your webserver serves the <code>*.wasm</code> file with <code>Content-Type: application/wasm</code> . Otherwise the browser won&#39;t be able to recognize it.</p>
670677
<p>Basically, all you need to do is set the MIME type for <code>.wasm</code> to <code>application/wasm</code>.</p>
@@ -678,7 +685,11 @@ <h2>Self-hosted Deployment</h2>
678685
</ul>
679686
</blockquote>
680687
</li>
688+
<li><p><strong>Step three</strong>: Configure the engineResourcePath</p>
689+
</li>
681690
</ul>
691+
<p>The <code>engineResourcePath</code> need to be set before <code>loadWasm</code>.</p>
692+
<pre><code class="language-js">Dynamsoft.BarcodeReader.engineResourcePath = <span class="hljs-string">"url/to/the/dir/"</span>;</code></pre>
682693
<a href="#changelog" id="changelog" style="color: inherit; text-decoration: none;">
683694
<h2>Changelog</h2>
684695
</a>
@@ -726,7 +737,7 @@ <h2>License Agreement</h2>
726737
<a href="#contact-us" id="contact-us" style="color: inherit; text-decoration: none;">
727738
<h2>Contact Us</h2>
728739
</a>
729-
<p>If there are any questions, please feel free to contact <a href="mailto:&#x73;&#117;&#112;&#x70;&#111;&#x72;&#116;&#x40;&#x64;&#x79;&#110;&#x61;&#x6d;&#x73;&#111;&#x66;&#x74;&#x2e;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#x70;&#111;&#x72;&#116;&#x40;&#x64;&#x79;&#110;&#x61;&#x6d;&#x73;&#111;&#x66;&#x74;&#x2e;&#99;&#x6f;&#x6d;</a>.</p>
740+
<p>If there are any questions, please feel free to contact <a href="mailto:&#x73;&#x75;&#x70;&#x70;&#x6f;&#114;&#116;&#64;&#x64;&#121;&#110;&#97;&#x6d;&#115;&#x6f;&#x66;&#116;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#x75;&#x70;&#x70;&#x6f;&#114;&#116;&#64;&#x64;&#121;&#110;&#97;&#x6d;&#115;&#x6f;&#x66;&#116;&#x2e;&#x63;&#111;&#x6d;</a>.</p>
730741
</div>
731742
</div>
732743
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">

0 commit comments

Comments
 (0)