Exemplo n.º 1
0
function get_terms($name, $source, $page, $removenumbers, $removequotations)
{
    $page = convert_pdf($page);
    print "{$source} document from " . htmlspecialchars($name) . " (" . strlen($page) . " characters";
    $page_text = strip_html($page, $removenumbers, $removequotations);
    // print ("page_text: $page_text\n");
    $result = preg_split('/\\s+/', $page_text);
    print ", " . count($result) . " words)<br/>";
    return $result;
}
Exemplo n.º 2
0
        include_once $_SERVER['DOCUMENT_ROOT'] . '/classes/mpdf/mpdf.php';
        $stylesheet = file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/assets/css/pdf-styles.css');
        $mpdf = new mPDF('default', 'A4', '8', 'san-serif', '12', '12', '65', '45', '10', '10', 'P');
        include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/pdf-parts/pdf-header.php';
        include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/pdf-parts/pdf-footer.php';
        $mpdf->WriteHTML($stylesheet, 1);
        $mpdf->WriteHTML($html);
        $mpdf->Output($data['ref'] . '.pdf', 'F');
        if (file_exists($data['ref'] . '.pdf')) {
            $total_pgs = getNumPagesPdf($data['ref'] . '.pdf');
            if ($total_pgs > 1) {
                for ($i = 1; $i <= $total_pgs; $i++) {
                    convert_pdf($data['ref'], $i, $i);
                }
            } else {
                convert_pdf($data['ref'], 1, 1);
            }
        }
        echo $html;
        ?>
				<div class="actions-btns">
					<form method="post" action="<?php 
        echo SITEROOT;
        ?>
/sendsig/" id="sendsig">
				    	<button id="confirm-sig" type="submit" class="btn btn-success btn-lg btn-block caps"><i class="glyphicon glyphicon-ok pull-left"></i>Confirm and send</button>
						<input type="hidden" value="<?php 
        echo $data['ref'];
        ?>
" name="cref">
					</form>