Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering or logging in.

[RT 124915] Get Page Size; Get Page Orientation

  • 3 Replies
  • 632 Views
*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
[RT 124915] Get Page Size; Get Page Orientation
« March 26, 2018, 09:45:02 AM »
Mon Mar 26 01:44:31 2018 david.ayliffe [...] agu.edu.tr - Ticket created
Subject:    Get Page Size; Get Page Orientation
Date:    Mon, 26 Mar 2018 08:43:41 +0300
From:    David Ayliffe <david.ayliffe [...] agu.edu.tr>

Adding these methods would be a great help. I can't currently see a way of getting this information.

Thanks

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: [RT 124915] Get Page Size; Get Page Orientation
« Reply #1: April 23, 2018, 04:49:04 PM »
Wouldn't you already know the page dimensions and orientation, since you have to give them at the beginning? I'm trying to think of any case where you wouldn't know what they are (including the default setting). Do you have an example where you have no way of finding out?

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: [RT 124915] Get Page Size; Get Page Orientation
« Reply #2: June 28, 2018, 02:53:12 PM »
Sat Jun 02 17:54:16 2018 steve [...] deefs.net - Correspondence added

See get_mediabox and related methods in PDF::API2::Page.

-- Steve

Sat Jun 02 17:54:17 2018 The RT System itself - Status changed from 'new' to 'open'

Sat Jun 02 17:54:18 2018 steve [...] deefs.net - Status changed from 'open' to 'resolved'

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: [RT 124915] Get Page Size; Get Page Orientation
« Reply #3: June 29, 2018, 12:01:22 PM »
Indeed, get_mediabox() should return the lower left (0,0) and upper right (default 595pt wide, 792pt high) corners of the page. If width > height, it's landscape orientation. That should do, so I'll close this.