Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 rifling through the Monastery: (13)
As of 2015-07-03 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (53 votes), past polls