This is currently the only possible way of addressing the issue, until https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/direction becomes generally available in browsers. *Note:* This will also require manually updating https://mozilla.github.io/pdf.js/examples/#interactive-examples