Пример #1
0
 public function init($data)
 {
     $this->pdf = Libs_TCPDFCommon::new_pdf($this->orientation);
     $this->set_margins();
     Libs_TCPDFCommon::prepare_header($this->pdf, $this->title, $this->subject, $this->printed_by, $this->logo);
     Libs_TCPDFCommon::add_page($this->pdf);
     $this->set_filename_extension('pdf');
 }
Пример #2
0
$rb->show_data($crits, $cols, $order, $admin, false, true, $limit);
$html = ob_get_clean();

$limit_info = '';
if (is_array($limit)) {
    $offset = $limit['offset'];
    $per_page = $limit['numrows'];
    $start = $offset + 1;
    $end = $offset + $per_page;
    $total = Utils_RecordBrowserCommon::get_records_count($tab, $crits, $admin, $order);
    if ($end > $total)
        $end = $total;
    $limit_info = __('Records %s to %s of %s', array($start, $end, $total)) . "\n";
}

$tcpdf = Libs_TCPDFCommon::new_pdf();

$filters = implode(' ',Utils_RecordBrowserCommon::crits_to_words($tab, $crits));
$filters = strip_tags($filters);
$filters = str_replace(' ', ' ', $filters);
$filters = str_replace(' and ', "\n", $filters);
$filters = str_replace(' is equal to', ':', $filters);

$subject = $limit_info . $filters;
Libs_TCPDFCommon::prepare_header($tcpdf, _V(DB::GetOne('SELECT caption FROM recordbrowser_table_properties WHERE tab=%s', array($tab))), $subject, false);
Libs_TCPDFCommon::add_page($tcpdf);

Libs_TCPDFCommon::SetFont($tcpdf, Libs_TCPDFCommon::$default_font, '', 6);

$html = Libs_TCPDFCommon::stripHTML(str_replace(array('<br>','&nbsp;'),array('<br/>',' '),$html));
Libs_TCPDFCommon::writeHTML($tcpdf, $html, false);
Пример #3
0
 public function construct($orientation = 'P', $unit = 'mm', $format = null)
 {
     $this->tcpdf = Libs_TCPDFCommon::new_pdf($orientation, $unit, $format);
 }