Fix image abscissa when in RTL (#510)

Co-authored-by: William Desportes <williamdes@wdes.fr>
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
This commit is contained in:
atomiix 2022-12-06 09:23:40 +01:00 committed by GitHub
parent f794192a90
commit d7da13a0c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ class MYPDF extends TCPDF {
$this->setAutoPageBreak(false, 0);
// set bacground image
$img_file = K_PATH_IMAGES.'image_demo.jpg';
$this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);
$this->Image($img_file, null, 0, 210, 297, '', '', '', false, 300, 'C', false, false, 0);
// restore auto-page-break status
$this->setAutoPageBreak($auto_page_break, $bMargin);
// set the starting point for the page content
@ -124,7 +124,7 @@ $auto_page_break = $pdf->getAutoPageBreak();
$pdf->setAutoPageBreak(false, 0);
// set bacground image
$img_file = K_PATH_IMAGES.'image_demo.jpg';
$pdf->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);
$pdf->Image($img_file, null, 0, 210, 297, '', '', '', false, 300, 'C', false, false, 0);
// restore auto-page-break status
$pdf->setAutoPageBreak($auto_page_break, $bMargin);
// set the starting point for the page content

View File

@ -7235,7 +7235,7 @@ class TCPDF {
} elseif ($palign == 'R') {
$ximg = $this->w - $this->rMargin - $w;
} else {
$ximg = $x;
$ximg = $this->rtl ? $x - $w : $x;
}
if ($ismask OR $hidden) {