1 | <?php |
||
22 | class Ghostscript |
||
23 | { |
||
24 | /** |
||
25 | * The default binary |
||
26 | */ |
||
27 | const DEFAULT_BINARY = 'gs'; |
||
28 | |||
29 | /** |
||
30 | * The versions. |
||
31 | * |
||
32 | * @var string[] |
||
33 | */ |
||
34 | protected static $versions = []; |
||
35 | |||
36 | /** |
||
37 | * The options. |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $options; |
||
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 | * Get version. |
||
78 | * |
||
79 | * @throws \RuntimeException |
||
80 | 24 | * |
|
81 | * @return string |
||
82 | 24 | */ |
|
83 | 24 | public function getVersion() |
|
100 | 24 | ||
101 | /** |
||
102 | 24 | * Create arguments object. |
|
103 | 3 | * |
|
104 | * @return Arguments |
||
105 | */ |
||
106 | 21 | protected function createArguments() |
|
116 | |||
117 | /** |
||
118 | * Create PDF device object. |
||
119 | 6 | * |
|
120 | * @param null|string $outputFile |
||
121 | 6 | * |
|
122 | 6 | * @return PdfWrite |
|
123 | */ |
||
124 | 6 | public function createPdfDevice($outputFile = null) |
|
138 | 3 | ||
139 | /** |
||
140 | 3 | * Create no display device object. |
|
141 | 3 | * |
|
142 | 3 | * @return NoDisplay |
|
143 | 3 | */ |
|
144 | public function createNoDisplayDevice() |
||
148 | |||
149 | 3 | /** |
|
150 | 3 | * Create PDF info device object. |
|
151 | 3 | * |
|
152 | * @param string $pdfInfoPath Path to toolbin/pdf_info.ps |
||
153 | 3 | * |
|
154 | * @return PdfInfo |
||
155 | */ |
||
156 | public function createPdfInfoDevice($pdfInfoPath) |
||
160 | |||
161 | /** |
||
162 | * Create bounding box info device object. |
||
163 | * |
||
164 | * @return BoundingBoxInfo |
||
165 | */ |
||
166 | public function createBoundingBoxInfoDevice() |
||
176 | } |
||
177 |