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 130039] mention how to *get* the global mediabox

  • 1 Replies
  • 25 Views
*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 572
    • View Profile
[RT 130039] mention how to *get* the global mediabox
« July 11, 2019, 02:23:09 PM »
Wed Jul 10 22:00:46 2019 jidanni [...] jidanni.org - Ticket created

We read $pdf->mediabox($llx, $lly, $urx, $ury) Sets the global mediabox. OK, but also mention how to *get* the global mediabox. E.g., "what is the current height?"

Thu Jul 11 13:55:07 2019 PMPERRY [...] cpan.org - Correspondence added

See 124915 (resolved bugs).

[Before closing as duplicate, check if documentation (POD) could be clarified.]

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 572
    • View Profile
Re: [RT 130039] mention how to *get* the global mediabox
« Reply #1: July 16, 2019, 03:05:46 PM »
Tue Jul 16 11:52:09 2019 steve [...] deefs.net - Correspondence added

There wasn't actually a method for getting the global boundary boxes, as it turns out.  The closest you could get was to call get_mediabox on a page, which would default to the global mediabox if it hadn't been overridden.

I've just updated mediabox, cropbox, bleedbox, trimbox, and artbox to do both getting and setting at both the PDF and page level.

[so is NOT quite a duplicate... fix adds global query, not just page]