Документация 1С-Битрикс: Модули native.tools

Пример использования

use \Bitrix\Main\Loader;
use \Bitrix\Main\LoaderException;
use \Native\Tools\Dictionary;
use \Native\Tools\Generator;

require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php';

// Генерация и отображение QR-кода
try {
    if (Loader::includeModule('native.tools')) {
        $string = 'https://site.localhost';
        $string = Generator::barcode($string, Dictionary::BARCODE_TYPE_QR, Dictionary::FORMAT_PNG, 400, 400);
        ?>
        <img src="<?= $string ?>" alt="">
        <?php
    }
} catch (LoaderException $e) {
    echo $e->getMessage();
}

require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/footer.php';