DomPDF Arabic Language Support | Ar-PHP 2023

DomPDF Arabic Language Support | Ar-PHP 2023

Nexample

1 год назад

4,288 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@user-gu3wo8ld4d
@user-gu3wo8ld4d - 06.10.2023 13:19

Bro what you did ??? still confusing
don't know what you are trying to do?
seriously fack video

Ответить
@user-by7rv5js2r
@user-by7rv5js2r - 13.09.2023 21:25

thanks broo you saved a lot time for me thanks

Ответить
@brilliantapps1974
@brilliantapps1974 - 12.09.2023 13:47

thanks alot bro it works fine

Ответить
@brilliantapps1974
@brilliantapps1974 - 12.09.2023 13:33

for all ho say that's fake it's not . i test it works

$root_dir = $_SERVER['DOCUMENT_ROOT'];
$dompDfPath = $root_dir.'\agile\plugins\dompdf-2/';
include($dompDfPath."autoload.inc.php");

$options = new Dompdf\Options;
$options->set('chroot',realpath($root_dir));
$options->set('defaultFont', 'Arabic');
require_once $dompDfPath.'vendor/src/Arabic.php';
$dompdf = new Dompdf\Dompdf($options);
$Arabic = new ArPHP\I18N\Arabic();

$html = ' ستخدام ';

$p = $Arabic->arIdentify($html);
for ($i = count($p)-1; $i >= 0; $i-=2) {
$utf8ar = $Arabic->utf8Glyphs(substr($html, $p[$i-1], $p[$i] - $p[$i-1]));
$html = substr_replace($html, $utf8ar, $p[$i-1], $p[$i] - $p[$i-1]);
}
$dompdf->loadHtml('
<!DOCTYPE html>
<head><style>
@font-face {
font-family:"Arabic";
src:url("agile/css/fonts/DIN-Next-LT-Arabic-Light.ttf");
}
body{
font-family:Arabic;
font-size: 100px;
text-align:right;
}

</style></head>
<body>
'.$html.'
</body></html>
');
$dompdf->setPaper('A4', 'portrait');
$dompdf->render();
$fileName = $root_dir.'test.pdf';
file_put_contents($fileName, $dompdf->output());

note : you can not use dompdf this way i just post it for quick to prove that's work . the first time try use it like me but after that you need to build your own api using dompdf for mor practical use

Ответить
@rameshganpatbhai2016
@rameshganpatbhai2016 - 23.08.2023 12:58

fack

Ответить
@ahmadmokhtar8175
@ahmadmokhtar8175 - 10.08.2023 02:04

one word >>>>>>fack video

Ответить
@hk20092009able
@hk20092009able - 23.07.2023 12:40

very complecated the method and explination

Ответить