Hi,
I’m not sure if this is a bug or if I’m using the object incorrectly.
I have two versions of the same A4 pdf. One is Portrait (original) and the other Landscape (rotation applied).
So, in order to get the correct measurements (based on visual instead of defined) I’m using effective trimbox:
const docWidth = Math.ceil( (app.doc.pages[0].effectiveTrimBox.right - app.doc.pages[0].effectiveTrimBox.left) / 2.835 );
const docHeight = Math.ceil( (app.doc.pages[0].effectiveTrimBox.top - app.doc.pages[0].effectiveTrimBox.bottom) / 2.835 );
If I use app.doc.pages[0].trimBox…right/left, etc. I get the measurements I’m expecting (210w x 297h) for both since this is the defined size.
However, if I use effectiveTrimBox I’m getting:
Portrait: 230w x 317h
Landscape: 317w x 226h
Not only I get an unexpected size, but they differ between the two pdfs.
The ArtBox is 230w x 317h, but I don’t see anything that could be 226mm:
I was expecting to get 297w x 210h when using effective trim box on the landscape pdf. Is this correct?
