PDFs with mixed page orientation display text vertically

Which product are you using?
PDF.js Express Plus

PDF.js Express Version

Detailed description of issue
We have a file with mixed page orientation: some are landscape, some are portrait. The text fields on the landscape pages appear just fine in Adobe Acrobat Pro with no edits needed on the field orientation. However when viewed and edited in pdfjs, the text is vertical.

Expected behaviour
The text field is presented with horizontal text to match the page orientation.

Does your issue happen with every document, or just one?
All documents with mixed page orientation

Link to document

Code snippet

Hello Chris,

I was able to reproduce the issue of the vertical text on the landscape pages.
I have created a bug report and added this to our backlog.

Best Regards,

Thanks for checking Darian.

What workarounds can we do in the interim and what’s the ETC on a fix?

Hello Chris,

Unfortunately, I don’t think we have any workarounds for this issue at the moment. We don’t have an estimated time, but we will let you know.

Best Regards,

Hey Darian,

Any update on an ETA for this one? We tried also just a document all in landscape (thinking that it was the mix that was causing it) and it won’t work so we’re out of options. Anything we can do, even with javascript or something else?


Hello Chris,

Unfortunately, we don’t have an ETA or any workarounds yet.

Best Regards,

Okay riddle me this: why does this form work? It’s also landscape but for some reason the fields work properly. I can’t find any settings in Acrobat that are different in a way that would change this behavior so if you can help me figure out why this works and the other doesn’t, we could get a work around for the malfunctioning one.

NP Medication Review Form.pdf (234.4 KB)

Hello Chris,

I was able to open that file and see that the text is displayed correctly when typing.

It seems like it might have something to do with the document rotation of the page.

If you run the following API, a value of 1 returns which I think corresponds to 90 degrees.

instance.Core.documentViewer.getCompleteRotation(19) // page 19

I ran the API on the first page of the new document you provided, it returns a value of 0 (no rotation).

If this is not the cause, it may have something to do with the annotations or it could be some low-code issue.

Best Regards,