PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 5.2.0
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v5.2.0
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / app / vendor / tecnickcom / tcpdf / tcpdf_import.php
matomo / app / vendor / tecnickcom / tcpdf Last commit date
config 2 years ago fonts 2 years ago include 1 year ago LICENSE.TXT 2 years ago README.md 2 years ago VERSION 1 year ago tcpdf.php 1 year ago tcpdf_autoconfig.php 2 years ago tcpdf_barcodes_1d.php 2 years ago tcpdf_barcodes_2d.php 2 years ago tcpdf_import.php 2 years ago tcpdf_parser.php 2 years ago
tcpdf_import.php
97 lines
1 <?php
2
3 namespace {
4 //============================================================+
5 // File name : tcpdf_import.php
6 // Version : 1.0.001
7 // Begin : 2011-05-23
8 // Last Update : 2013-09-17
9 // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
10 // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
11 // -------------------------------------------------------------------
12 // Copyright (C) 2011-2013 Nicola Asuni - Tecnick.com LTD
13 //
14 // This file is part of TCPDF software library.
15 //
16 // TCPDF is free software: you can redistribute it and/or modify it
17 // under the terms of the GNU Lesser General Public License as
18 // published by the Free Software Foundation, either version 3 of the
19 // License, or (at your option) any later version.
20 //
21 // TCPDF is distributed in the hope that it will be useful, but
22 // WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 // See the GNU Lesser General Public License for more details.
25 //
26 // You should have received a copy of the License
27 // along with TCPDF. If not, see
28 // <http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT>.
29 //
30 // See LICENSE.TXT file for more information.
31 // -------------------------------------------------------------------
32 //
33 // Description : This is a PHP class extension of the TCPDF library to
34 // import existing PDF documents.
35 //
36 //============================================================+
37 /**
38 * @file
39 * !!! THIS CLASS IS UNDER DEVELOPMENT !!!
40 * This is a PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.<br>
41 * @package com.tecnick.tcpdf
42 * @author Nicola Asuni
43 * @version 1.0.001
44 */
45 // include the TCPDF class
46 require_once \dirname(__FILE__) . '/tcpdf.php';
47 // include PDF parser class
48 require_once \dirname(__FILE__) . '/tcpdf_parser.php';
49 /**
50 * @class TCPDF_IMPORT
51 * !!! THIS CLASS IS UNDER DEVELOPMENT !!!
52 * PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.<br>
53 * @package com.tecnick.tcpdf
54 * @brief PHP class extension of the TCPDF library to import existing PDF documents.
55 * @version 1.0.001
56 * @author Nicola Asuni - info@tecnick.com
57 */
58 class TCPDF_IMPORT extends \TCPDF
59 {
60 /**
61 * Import an existing PDF document
62 * @param string $filename Filename of the PDF document to import.
63 * @return void
64 * @public
65 * @since 1.0.000 (2011-05-24)
66 */
67 public function importPDF($filename)
68 {
69 // load document
70 $rawdata = \file_get_contents($filename);
71 if ($rawdata === \false) {
72 $this->Error('Unable to get the content of the file: ' . $filename);
73 }
74 // configuration parameters for parser
75 $cfg = array('die_for_errors' => \false, 'ignore_filter_decoding_errors' => \true, 'ignore_missing_filter_decoders' => \true);
76 try {
77 // parse PDF data
78 $pdf = new \TCPDF_PARSER($rawdata, $cfg);
79 } catch (\Exception $e) {
80 die($e->getMessage());
81 }
82 // get the parsed data
83 $data = $pdf->getParsedData();
84 // release some memory
85 unset($rawdata);
86 // ...
87 \print_r($data);
88 // DEBUG
89 unset($pdf);
90 }
91 }
92 // END OF CLASS
93 //============================================================+
94 // END OF FILE
95 //============================================================+
96 }
97