János
János

Reputation: 35050

Aspect ratio of FSPDFViewCtrl

Do you know a way to fetch the aspect ratio of a PDF loaded into FSPDFViewCtrl? I could not find any appropriate methods or properties.

Upvotes: 0

Views: 40

Answers (1)

glyvox
glyvox

Reputation: 58049

Since aspect ratios can differ from page to page, it's only possible to fetch the ratio of a specific page by dividing its width by its height:

let ratio = page.getWidth() / page.getHeight()

Upvotes: 0

Related Questions