gettalong / hexapdf

Versatile PDF creation and manipulation for Ruby
https://hexapdf.gettalong.org
Other
1.24k stars 70 forks source link

Getting the doc/page width #200

Closed brandit-dev closed 2 years ago

brandit-dev commented 2 years ago

I tried to find if doc or page would give me the width of the document/page but couldn't find it.
I'm sure it's there somewhere. Is it possible?

gettalong commented 2 years ago

Each page can be of a different size, so this is a property of a page. Therefore see https://hexapdf.gettalong.org/documentation/reference/api/HexaPDF/Type/Page.html#method-i-box which returns the media box by default.