Which product are you using?
PDF.js Express Version
8.7.4
Detailed description of issue
We are using a viewer with custom rectangular drawing tool to allow users to select regions in pdfs and later on we use tabula-java lib to extract tables from these regions.
The issue appears to be the rotations of pdfs. Some pdfs are exported from various tools e.g. CAD tools in a landscape position and pdf.js express detects document rotation to be 90deg (BUT NOT FOR ALL LANDSCAPE PDFs, only some). The other pdfs were created with no rotation, but later on in some viewer rotated and saved. Again pdf.js express detects them as rotated. This all would be fine, because on the viewer side I manage to handle these rotations with no issue and adjust the selection tool.
The problem is that when I send the end coordinates to tabula-java, that lib treats some pdfs that in the viewer have document rotation as without rotation. How could this be happening? Isn’t document rotation internal pdf property same everywhere? Is it possible to distinguish these rotations? Any insights/suggestions on how to come across issue of same pdfs having different rotations depending on the lib parsing it?
Expected behaviour
document rotation same everywhere or method to get different types of pdf rotations.
Does your issue happen with every document, or just one?
various pdfs
Link to document
not available
Code snippet
N/A