1 | <?php |
||
18 | class PdfWriter |
||
19 | { |
||
20 | /** |
||
21 | * @var ObjectWriter |
||
22 | */ |
||
23 | private $objectWriter; |
||
24 | |||
25 | /** |
||
26 | * @var PdfWriterOptions |
||
27 | */ |
||
28 | private $options; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $permanentFileIdentifier; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $changingFileIdentifier; |
||
39 | |||
40 | /** |
||
41 | * @var EncryptionInterface|null |
||
42 | */ |
||
43 | private $encryption; |
||
44 | |||
45 | /** |
||
46 | * @var array |
||
47 | */ |
||
48 | private $objectOffsets = []; |
||
49 | |||
50 | /** |
||
51 | * @param SplFileObject $fileObject |
||
52 | */ |
||
53 | public function __construct(SplFileObject $fileObject, PdfWriterOptions $options) |
||
74 | |||
75 | /** |
||
76 | * Closes the document by writing the file trailer. |
||
77 | * |
||
78 | * While the PDF writer will remove all references to the passed in file object in itself to avoid further writing |
||
79 | * and to allow the file pointer to be closed, the callee may still have a reference to it. If that is the case, |
||
80 | * make sure to unset it if you don't need it. |
||
81 | * |
||
82 | * Any further attempts to append data to the PDF writer will result in an exception. |
||
83 | */ |
||
84 | public function closeDocument() |
||
91 | |||
92 | /** |
||
93 | * Creates a PDF writer which writes everything to a file. |
||
94 | * |
||
95 | * @param string $filename |
||
96 | * @return static |
||
97 | */ |
||
98 | public static function toFile($filename) |
||
102 | |||
103 | /** |
||
104 | * Creates a PDF writer which outputs everything to the STDOUT. |
||
105 | * |
||
106 | * @return static |
||
107 | */ |
||
108 | public static function output() |
||
112 | |||
113 | /** |
||
114 | * Choose an encryption algorithm based on the PDF version. |
||
115 | * |
||
116 | * @param string $version |
||
117 | * @param string $userPassword |
||
118 | * @param string|null $ownerPassword |
||
119 | * @param Permissions|null $userPermissions |
||
120 | */ |
||
121 | private function chooseEncryption( |
||
137 | |||
138 | /** |
||
139 | * Writes the xref table. |
||
140 | * |
||
141 | * @return int |
||
142 | */ |
||
143 | private function writeXrefTable() |
||
158 | |||
159 | /** |
||
160 | * Writes the trailer. |
||
161 | */ |
||
162 | private function writeTrailer() |
||
181 | |||
182 | /** |
||
183 | * Writes the footer. |
||
184 | * |
||
185 | * @param int $xrefOffset |
||
186 | */ |
||
187 | private function writeFooter($xrefOffset) |
||
194 | } |
||
195 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.