Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
9 / 9 |
|
100.00% |
6 / 6 |
CRAP | |
100.00% |
1 / 1 |
| PdfVtProfile | |
100.00% |
9 / 9 |
|
100.00% |
6 / 6 |
9 | |
100.00% |
1 / 1 |
| getFamily | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getLevel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPdfVersion | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getXmpNamespace | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getXmpPrefix | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getXmpProperties | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
4 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\Pdf\Conformance\Profile; |
| 6 | |
| 7 | use Phpdftk\Pdf\Core\PdfVersion; |
| 8 | |
| 9 | /** |
| 10 | * PDF/VT conformance profiles (ISO 16612). |
| 11 | * |
| 12 | * PDF/VT is designed for variable and transactional printing workflows. |
| 13 | * All levels build on PDF/X-4 and add DPartRoot requirements. |
| 14 | * |
| 15 | * PDF/VT-1 (ISO 16612-2): single-file exchange, based on PDF/X-4 + PDF 2.0 |
| 16 | * PDF/VT-2 (ISO 16612-2): multi-file streaming, based on PDF/X-4 + PDF 2.0 |
| 17 | * PDF/VT-2s (ISO 16612-3): streamed subset, based on PDF/X-4 + PDF 2.0 |
| 18 | */ |
| 19 | enum PdfVtProfile: string implements ConformanceProfile |
| 20 | { |
| 21 | case VT1 = 'VT-1'; |
| 22 | case VT2 = 'VT-2'; |
| 23 | case VT2s = 'VT-2s'; |
| 24 | |
| 25 | public function getFamily(): string |
| 26 | { |
| 27 | return 'PDF/VT'; |
| 28 | } |
| 29 | |
| 30 | public function getLevel(): string |
| 31 | { |
| 32 | return $this->value; |
| 33 | } |
| 34 | |
| 35 | public function getPdfVersion(): PdfVersion |
| 36 | { |
| 37 | return PdfVersion::V2_0; |
| 38 | } |
| 39 | |
| 40 | public function getXmpNamespace(): string |
| 41 | { |
| 42 | return 'http://www.npes.org/pdfvt/ns/id/'; |
| 43 | } |
| 44 | |
| 45 | public function getXmpPrefix(): string |
| 46 | { |
| 47 | return 'pdfvtid'; |
| 48 | } |
| 49 | |
| 50 | public function getXmpProperties(): array |
| 51 | { |
| 52 | return ['GTS_PDFVTVersion' => match ($this) { |
| 53 | self::VT1 => 'PDF/VT-1', |
| 54 | self::VT2 => 'PDF/VT-2', |
| 55 | self::VT2s => 'PDF/VT-2s', |
| 56 | }]; |
| 57 | } |
| 58 | } |