Re: Trim the spaces around a pdf file

"aqua" <[email protected]> Sat, 15 Mar 2008 06:20:56 +0000
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
Did you try

my ($llx, $lly, $urx, $ury) = $SrcPg->get_trimbox;

Regs
Dominic

>  -------Original Message-------
>  From: hackthis000 <hackthis000-/[email protected]>
>  Subject: [perl-text-pdf-modules] Trim the spaces around a pdf file
>  Sent: 15 Mar '08 01:25
>  
>  Hi:
>  
>  I am not very familiar with perl and the api. After some searches, it
>  seems be able to return the trimbox of an existing pdf.
>  e.g.
>  my ($self)=@_;
>  my $cropBoxRef=$self->find_prop("CropBox");
>  if ($cropBoxRef) {
>  return map {$_->val} $cropBoxRef->elementsof;
>  }
>  else {
>  return $self->get_mediabox();
>  }
>  }
>  
>  Then how can I get the physical coordinates of the trimbox (or othe
>  ways), in order to clip the actual content
>  
>  cheers
>  kenpeter
>  
>