On #325 (feature/pdfua-1-support), right-to-left runs are drawn in visual order with no /ActualText and no /ReversedChars, so text extraction and assistive technology read the words reversed.
$mpdf = new \Mpdf\Mpdf(['PDFUA' => true, 'PDFUAauto' => true]);
$mpdf->SetTitle('RTL');
$mpdf->WriteHTML('<p dir="rtl" lang="ar">مرحبا بالعالم</p>');
// pdftotext returns the two words in reverse order
veraPDF doesn't flag this. It still breaks Matterhorn 09-001, where the content order must be the logical order.
Expected. Wrap each RTL run's marked content with /ActualText holding the logical string, or split it into words with /ReversedChars. Shaped Arabic and Indic text also needs /ActualText wherever glyph substitutions lose the characters that ToUnicode can't map.
On #325 (
feature/pdfua-1-support), right-to-left runs are drawn in visual order with no/ActualTextand no/ReversedChars, so text extraction and assistive technology read the words reversed.veraPDF doesn't flag this. It still breaks Matterhorn 09-001, where the content order must be the logical order.
Expected. Wrap each RTL run's marked content with
/ActualTextholding the logical string, or split it into words with/ReversedChars. Shaped Arabic and Indic text also needs/ActualTextwherever glyph substitutions lose the characters that ToUnicode can't map.