Skip to content

Commit 9f3d2f0

Browse files
committed
fix: set user language hardcoded
The problem: The follow code verify the string in English, but if the operational system is in another language, don't will match the string: https://github.com/JSignPdf/jsignpdf-php/blob/v1.2.5/src/Sign/JSignService.php#L30-L33 English text: Finished: Signature succesfully created. German text: Fertig: Signatur erfolgreich erzeugt. To solve was necessary to mahe the java user language hardcoded as English. Signed-off-by: Vitor Mattos <[email protected]>
1 parent 3596031 commit 9f3d2f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Sign/JSignService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private function commandSign(JSignParam $params)
127127
$this->throwIf(!file_exists($jSignPdf), 'Jar of JSignPDF not found on path: '. $jSignPdf);
128128

129129
$password = escapeshellarg($params->getPassword());
130-
return "$java -jar $jSignPdf $pdf -ksf $certificate -ksp {$password} {$params->getJSignParameters()} -d {$params->getPathPdfSigned()} 2>&1";
130+
return "$java -Duser.language=en -jar $jSignPdf $pdf -ksf $certificate -ksp {$password} {$params->getJSignParameters()} -d {$params->getPathPdfSigned()} 2>&1";
131131
}
132132

133133
private function javaCommand(JSignParam $params)

0 commit comments

Comments
 (0)