1 | <?php |
||
22 | class Ghostscript |
||
23 | { |
||
24 | /** |
||
25 | * The default binary |
||
26 | */ |
||
27 | const DEFAULT_BINARY = 'gs'; |
||
28 | |||
29 | /** |
||
30 | * The options |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $options; |
||
35 | |||
36 | /** |
||
37 | * The version |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $version; |
||
42 | |||
43 | /** |
||
44 | * Create Ghostscript object |
||
45 | * |
||
46 | * @param array $options |
||
47 | 27 | * |
|
48 | * @throws \RuntimeException |
||
49 | 27 | */ |
|
50 | public function __construct(array $options = []) |
||
58 | |||
59 | /** |
||
60 | * Get option |
||
61 | * |
||
62 | * @param string $name |
||
63 | * @param mixed $default |
||
64 | 24 | * |
|
65 | * @return mixed |
||
66 | 24 | */ |
|
67 | 6 | public function getOption($name, $default = null) |
|
75 | |||
76 | /** |
||
77 | * Create process builder object |
||
78 | * |
||
79 | * @param array $arguments |
||
80 | 24 | * |
|
81 | * @return ProcessBuilder |
||
82 | 24 | */ |
|
83 | 24 | protected function createProcessBuilder(array $arguments = []) |
|
94 | |||
95 | /** |
||
96 | 24 | * Get version |
|
97 | * |
||
98 | 24 | * @throws \RuntimeException |
|
99 | 24 | * |
|
100 | 24 | * @return string |
|
101 | */ |
||
102 | 24 | public function getVersion() |
|
117 | |||
118 | /** |
||
119 | 6 | * Create process arguments object |
|
120 | * |
||
121 | 6 | * @param array $arguments |
|
122 | 6 | * |
|
123 | * @return ProcessArguments |
||
124 | 6 | */ |
|
125 | 6 | protected function createProcessArguments(array $arguments = []) |
|
136 | |||
137 | /** |
||
138 | 3 | * Create PDF device object |
|
139 | * |
||
140 | 3 | * @param null|string $outputFile |
|
141 | 3 | * |
|
142 | 3 | * @return PdfWrite |
|
143 | 3 | */ |
|
144 | public function createPdfDevice($outputFile = null) |
||
161 | |||
162 | /** |
||
163 | * Create null device object |
||
164 | * |
||
165 | * @return NoDisplay |
||
166 | */ |
||
167 | public function createNullDevice() |
||
174 | |||
175 | /** |
||
176 | * Create PDF info device object |
||
177 | * |
||
178 | * @param string $pdfInfoPath Path to toolbin/pdf_info.ps |
||
179 | * @return PdfInfo |
||
180 | */ |
||
181 | public function createPdfInfoDevice($pdfInfoPath) |
||
188 | |||
189 | /** |
||
190 | * Create bounding box info device object |
||
191 | * |
||
192 | * @return BoundingBoxInfo |
||
193 | */ |
||
194 | public function createBboxDevice() |
||
207 | } |
||
208 |