> For the complete documentation index, see [llms.txt](https://docs.yansalabs.com/barcode-and-qr-code-generator/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yansalabs.com/barcode-and-qr-code-generator/technical-docs/using-a-barcode-label/use-in-custom-app.md).

# Use in Custom App

### Generate barcode label HTML for use in your own custom app:

1. Include the code below in any area where server-side scripting is allowed in order to generate & consume the HTML for a barcode label. The function returns an HTML string of the complete barcode label.

<pre class="language-javascript"><code class="lang-javascript">var barHelper = new x_yala_bargen.BarcodeGeneratorHelper();
<strong>var barHTML = barHelper.getBarcodeHTML(barcodeID, tableName, recID, serverRender);
</strong></code></pre>

* **barcodeID**: SysID of the **Barcode Generator** record to use for barcode generation
* **tableName**: Table of the record being referenced for barcode generation
* **recID**: SysID of the record being reference for barcode generation
* **serverRender**: true/false whether to render the HTML server-side (usually true)

### Generate barcode part SVG/HTML for use in your own custom app:

{% hint style="info" %}
This method generates SVG/HTML code for a **Barcode Part**, not an entire **Barcode Generator** label.
{% endhint %}

1. Include the code below in any area where server-side scripting is allowed in order to generate & consume the SVG/HTML for a barcode part. The function returns an HTML string of the complete barcode part SVG code.

<pre class="language-javascript"><code class="lang-javascript">var barHelper = new x_yala_bargen.BarcodeGeneratorHelper();
<strong>var barPartSVG = barHelper.getBarcodeSVG(barPartID, tableName, recID);
</strong></code></pre>

* **barPartID**: SysID of the **Barcode Part** record to use for barcode generation
* **tableName**: Table of the record being referenced for barcode generation
* **recID**: SysID of the record being reference for barcode generation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yansalabs.com/barcode-and-qr-code-generator/technical-docs/using-a-barcode-label/use-in-custom-app.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
