| @@ 111-118 (lines=8) @@ | ||
| 108 | */ |
|
| 109 | public static function forPdfVersion($pdfVersion, $permanentFileIdentifier, EncryptionOptions $options) |
|
| 110 | { |
|
| 111 | if (version_compare($pdfVersion, '1.6', '>=')) { |
|
| 112 | return new Pdf16Encryption( |
|
| 113 | $permanentFileIdentifier, |
|
| 114 | $options->getUserPassword(), |
|
| 115 | $options->getOwnerPassword(), |
|
| 116 | $options->getUserPermissions() |
|
| 117 | ); |
|
| 118 | } |
|
| 119 | ||
| 120 | if (version_compare($pdfVersion, '1.4', '>=')) { |
|
| 121 | return new Pdf14Encryption( |
|
| @@ 120-127 (lines=8) @@ | ||
| 117 | ); |
|
| 118 | } |
|
| 119 | ||
| 120 | if (version_compare($pdfVersion, '1.4', '>=')) { |
|
| 121 | return new Pdf14Encryption( |
|
| 122 | $permanentFileIdentifier, |
|
| 123 | $options->getUserPassword(), |
|
| 124 | $options->getOwnerPassword(), |
|
| 125 | $options->getUserPermissions() |
|
| 126 | ); |
|
| 127 | } |
|
| 128 | ||
| 129 | return new Pdf11Encryption( |
|
| 130 | $permanentFileIdentifier, |
|