Lines Matching refs:file
3 * This file is part of FPDI
92 * Release resources and file handles.
141 * Get an unique reader id by the $file parameter.
143 * @param string|resource|PdfReader|StreamReader $file An open file descriptor, a path to a file, a PdfReader
147 protected function getPdfReaderId($file)
149 if (\is_resource($file)) {
150 $id = (string) $file;
151 } elseif (\is_string($file)) {
152 $id = \realpath($file);
154 $id = $file;
156 } elseif (\is_object($file)) {
157 $id = \spl_object_hash($file);
160 \sprintf('Invalid type in $file parameter (%s)', \gettype($file))
169 if (\is_resource($file)) {
170 $streamReader = new StreamReader($file);
171 } elseif (\is_string($file)) {
172 $streamReader = StreamReader::createByFile($file);
175 $streamReader = $file;
203 * Set the source PDF file.
205 * @param string|resource|StreamReader $file Path to the file or a stream resource or a StreamReader instance.
209 public function setSourceFile($file)
211 $this->currentReaderId = $this->getPdfReaderId($file);