Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Get the existing margin on a pdf page

by Anonymous Monk
on Aug 21, 2013 at 09:56 UTC ( #1050317=note: print w/ replies, xml ) Need Help??


in reply to Get the existing margin on a pdf page

http://stackoverflow.com/questions/2604920/how-to-shift-pdf-page-using-perl-campdf-pdfapi2/2634583#2634583

my $pdf = CAM::PDF->new('my.pdf'); my $page = $pdf->getPage(1); my $mediabox = $page->{MediaBox}->{value}; my( $hix, $hiy, $lox , $loy ) = map { $_->{value} } @$mediabox;


Comment on Re: Get the existing margin on a pdf page
Download Code
Re^2: Get the existing margin on a pdf page
by ps04 (Initiate) on Aug 22, 2013 at 05:15 UTC
    Hey Thanks for the reply but, That will give the size of media/page not the margin of text present on the pdf page.

      Hey Thanks for the reply but, That will give the size of media/page not the margin of text present on the pdf page.

      The author of CAM::PDF answered the question how to move page to the right, by manipulating mediabox -- thats like increasing the margin -- so it is the margin of the page

      But I really don't use CAM::PDF much

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1050317]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2014-12-26 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls