| @@ 50-63 (lines=14) @@ | ||
| 47 | * |
|
| 48 | * @return string |
|
| 49 | */ |
|
| 50 | public function getCannotEmbedFontPolicy() |
|
| 51 | { |
|
| 52 | $value = $this->getArgumentValue('-dCannotEmbedFontPolicy'); |
|
| 53 | if (null === $value) { |
|
| 54 | switch ($this->getPdfSettings()) { |
|
| 55 | case PdfSettings::PREPRESS: |
|
| 56 | return CannotEmbedFontPolicy::ERROR; |
|
| 57 | default: |
|
| 58 | return CannotEmbedFontPolicy::WARNING; |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| 62 | return substr($value, 1); |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Set cannot embed font policy |
|
| @@ 202-215 (lines=14) @@ | ||
| 199 | * |
|
| 200 | * @return string |
|
| 201 | */ |
|
| 202 | public function getMonoImageDownsampleType() |
|
| 203 | { |
|
| 204 | $value = $this->getArgumentValue('-dMonoImageDownsampleType'); |
|
| 205 | if (null === $value) { |
|
| 206 | switch ($this->getPdfSettings()) { |
|
| 207 | case PdfSettings::PREPRESS: |
|
| 208 | return ImageDownsampleType::BICUBIC; |
|
| 209 | default: |
|
| 210 | return ImageDownsampleType::SUBSAMPLE; |
|
| 211 | } |
|
| 212 | } |
|
| 213 | ||
| 214 | return substr($value, 1); |
|
| 215 | } |
|
| 216 | ||
| 217 | /** |
|
| 218 | * Set monochrome image downsample type |
|
| @@ 279-293 (lines=15) @@ | ||
| 276 | * |
|
| 277 | * @return int |
|
| 278 | */ |
|
| 279 | public function getMonoImageResolution() |
|
| 280 | { |
|
| 281 | $value = $this->getArgumentValue('-dMonoImageResolution'); |
|
| 282 | if (null === $value) { |
|
| 283 | switch ($this->getPdfSettings()) { |
|
| 284 | case PdfSettings::PRINTER: |
|
| 285 | case PdfSettings::PREPRESS: |
|
| 286 | return 1200; |
|
| 287 | default: |
|
| 288 | return 300; |
|
| 289 | } |
|
| 290 | } |
|
| 291 | ||
| 292 | return intval($value); |
|
| 293 | } |
|
| 294 | ||
| 295 | /** |
|
| 296 | * Set monochrome image resolution |
|
| @@ 131-144 (lines=14) @@ | ||
| 128 | * |
|
| 129 | * @return float |
|
| 130 | */ |
|
| 131 | public function getCompatibilityLevel() |
|
| 132 | { |
|
| 133 | $value = $this->getArgumentValue('-dCompatibilityLevel'); |
|
| 134 | if (null === $value) { |
|
| 135 | switch ($this->getPdfSettings()) { |
|
| 136 | case PdfSettings::SCREEN: |
|
| 137 | return 1.3; |
|
| 138 | default: |
|
| 139 | return 1.4; |
|
| 140 | } |
|
| 141 | } |
|
| 142 | ||
| 143 | return floatval($value); |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * Set compatibility level |
|