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

Re: Re: PDF::Create Questions

by peppiv (Curate)
on Apr 08, 2003 at 14:32 UTC ( #248941=note: print w/ replies, xml ) Need Help??


in reply to Re: PDF::Create Questions
in thread PDF::Create Questions

Thank for the help. The rectangle works like a charm. It's a shame you couldn't shade with the fill command. That would rock.

In the FileHandle example (your code explains more than the docs) how do I declare $self? Would this line come after the Create line? Sorry for all the questions.

peppiv


Comment on Re: Re: PDF::Create Questions
Re^3: PDF::Create Questions
by tall_man (Parson) on Apr 08, 2003 at 15:33 UTC
    You don't have to declare $self. I just clipped out a line from the PDF::Create "new" function to show you that it opens the file with a '>' in front of the name, which means that it will overwrite the old file automatically. There's no extra code you have to put in.
      I can't seem to get it right. I understand using the '>' to open a file to overwrite, but no matter how I try to make the syntax work, I fail.

      How do I get from here

      my $fh = new FileHandle "> $self->{'filename'}";
      to here?

      my $pdf = new PDF::Create ('filename' => '/html/mypdf.pdf', 'PageMode' => 'UseNone', );
      Even trying this
      my $pdf = new PDF::Create "> ('filename' => '/html/mypdf.pdf', 'PageMode' => 'UseNone', )";
      and giving the pdf file 777 permissions doesn't work. Please help!

      peppiv

        You are not being specific about what you mean by "I fail" and "it doesn't work." What's the error message?

        Using the sample.pl file that came with the PDF::Create module, I was able to overwrite an existing pdf file with no problem at all. I can't imagine what is going wrong unless there is something strange about "/html"... Try creating and overwriting in a local directory instead.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2014-09-02 13:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (22 votes), past polls