[Bioperl-l] How to retrieve fulltext in pdf using BioPerl

George Hartzell hartzell at alerce.com
Tue Dec 9 04:54:52 UTC 2008


Gao Chunhui writes:
 > Hi, all
 >     Does anyone have a script could fetch PDF for a PubMed ID using
 > bioperl module?
 >     I want to do this job but the instruction of
 > "Bio::DB::Biblio::pdf" is hard to follow.  I searched the wiki site
 > for a reference with no useful information either.
 >     If somebody knows the right way, please tell me.
 > 
 >    Thank you in advance.
 > Best wishes.
 > yours, spring Gao

Hmmm, I thought that this mightwork (based on the cpan docs), but

  #!/usr/bin/perl
  
  use strict;
  use warnings;
  
  use Bio::Biblio;
  my $biblio = Bio::Biblio->new( -access => 'pdf');
  $biblio = $biblio->find( 14726805 );
  my $pdf = $biblio->pdf();
  open PDF, ">foo.pdf" or die "Unable to open foo.pdf\n";
  print PDF $pdf;
  close PDF or die "Unable to close foo.pdf\n";
  
  exit(0);
  
it turns out that when I try to run it I don't have a pdf.pm.  A bit
of digging makes it look like it's been removed somewhere between CPAN
version and the tip of the tree.

I'll leave it up to others who are more current to let you know if
there's a newer way to do things.

g.



More information about the Bioperl-l mailing list