One more thing for the sample PDF: try copying a sentence back out of it. Text can look right but still come out in the wrong order when copied, especially with mixed scripts.
Thanks for pointing this out! I’ll test copying text from the sample PDF, especially with mixed scripts, to verify that the text order is preserved correctly.