# e2pdf/1.32.43/classes/helper/e2pdf-js.php

E2Pdf – Export Pdf Tool for WordPress, version 1.32.43. 45 lines.

- Page: https://pluginprobe.com/plugins/e2pdf/1.32.43/code/classes/helper/e2pdf-js.php
- Raw: https://pluginprobe.com/plugins/e2pdf/1.32.43/raw/classes/helper/e2pdf-js.php
- Modified: 2026-07-27T12:51:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/e2pdf/1.32.43/code/classes/helper/e2pdf-js.php#L10-L20`.

```php
<?php

/**
 * E2pdf Js Helper
 * 
 * @copyright  Copyright 2017 https://e2pdf.com
 * @license    GPLv3
 * @version    1
 * @link       https://e2pdf.com
 * @since      0.00.01
 */
if (!defined('ABSPATH')) {
    die('Access denied.');
}

class Helper_E2pdf_Js {

    /**
     * Prepare Key/Value to show in JavaScript
     * 
     * @param string $key - Key
     * @param array $data - Value
     * 
     * @return string - Prepared string to insert in JS
     */
    public function get_js_array($key, $data = array()) {
        $string = "var {$key} = " . json_encode($data);
        return $string;
    }

    /**
     * Prepare Key/Value to show in JavaScript
     * 
     * @param string $key - Key
     * @param string $value - Value
     * 
     * @return string - Prepared string to insert in JS
     */
    public function get_js_value($key, $value) {
        $string = "var {$key} = '{$value}'";
        return $string;
    }

}

```
