Skip to content

Commit

Permalink
fix document
Browse files Browse the repository at this point in the history
  • Loading branch information
tale-fau committed Sep 26, 2023
1 parent c6a93c1 commit 51aacf4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
$f3->set('PDF_STORAGE_PATH', $f3->get('PDF_STORAGE_PATH').'/');
}

if($f3->get('PDF_DEMO_LINK') === null || $f3->get('PDF_DEMO_LINK') === true) {
$f3->set('PDF_DEMO_LINK', 'https://raw.githubusercontent.com/24eme/signaturepdf/master/tests/files/document.pdf');
}

$f3->set('disableOrganization', false);
if($f3->get('DISABLE_ORGANIZATION')) {
$f3->set('disableOrganization', $f3->get('DISABLE_ORGANIZATION'));
Expand Down Expand Up @@ -64,6 +60,14 @@ function changeLanguage($lang, $f3) {
$f3->set('DIRECTION_LANGUAGE', 'rtl');
}

if($f3->get('PDF_DEMO_LINK') === null || $f3->get('PDF_DEMO_LINK') === true) {
if ($f3->get('TRANSLATION_LANGUAGE') == "ar") {
$f3->set('PDF_DEMO_LINK', 'https://raw.githubusercontent.com/24eme/signaturepdf/master/tests/files/document_ar.pdf');
} else {
$f3->set('PDF_DEMO_LINK', 'https://raw.githubusercontent.com/24eme/signaturepdf/master/tests/files/document.pdf');
}
}

$f3->route('GET /',
function($f3) {
$f3->reroute($f3->get('REVERSE_PROXY_URL').'/signature');
Expand Down
Binary file modified tests/files/document_ar.pdf
Binary file not shown.

0 comments on commit 51aacf4

Please sign in to comment.