# Printing Options

Default page size is ISO\_A4, function to set any other custom size

{% hint style="info" %}
You'll need to import the javascript file in your website before starting from this [link](https://docs.webtonative.com/javascript-apis/getting-started).
{% endhint %}

{% tabs %}
{% tab title="Plain JS" %}

```
window.WTN.Printing.setPrintSize({
    "printSize":"Your print size value", //Eg. ISO_A4, ISO_B1, JIS_B3
    "label":"Any custom value you want" //optional
})

```

{% endtab %}

{% tab title="ES 6+" %}

```
import { Printing } from "webtonative"

Printing.setPrintSize({
    "printSize":"Your print size value", //Eg. ISO_A4, ISO_B1, JIS_B3
    "label":"Any custom value you want" //optional
})
```

{% endtab %}
{% endtabs %}

printSize - Value of the page size that you want. Refer to the official docs for the supported values [link](https://developer.android.com/reference/android/print/PrintAttributes.MediaSize).

label (Optional) - To set label which is supported on selected devices when the print preview is loaded.

Feature taken live on 21/08/2024

## Print Using Function

Call the function to print either by passing an html content or the url of the page/website. (Available on Android Only)

{% tabs %}
{% tab title="Plain JS" %}
{% code overflow="wrap" %}

```
window.WTN.printFunction({
    "type":"Your print type", //Eg. html or url
    "url":"Link or html content" // Url of the page/website or html content that needs to be printed
})
```

{% endcode %}
{% endtab %}

{% tab title="ES 6+" %}

<pre><code><strong>import { printFunction } from "webtonative"
</strong><strong>
</strong><strong>printFunction({
</strong>    "type":"Your print type", //Eg. html or url
    "url":"Link or html content" // Url of the page/website or html content that needs to be printed
})
</code></pre>

{% endtab %}
{% endtabs %}

\*Feature was taken live on 01/07/2024 (Available on Android Only)
