Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: PDF::Create - found a SOLUTION quite by chance!

by George_Sherston (Vicar)
on Jun 04, 2002 at 11:57 UTC ( [id://171450]=note: print w/replies, xml ) Need Help??


in reply to PDF::Create - send output to STDOUT?

So my computer crashed - this is normal, as it's old and clunky and doesn't cohabit well with my cable modem and runs win98 and I'm too cheap and lazy to get anything else.

And whilst it reconstructed myself I thought I'd use my time profitably by reading the Camel. Aren't I a diligent monk?

So what to read? Need to formalise my cargo-cultish understanding of derefencing, so turn to page 251. But for no well explained reason I happen to glance to the left and I see the *foo{THING} syntax... which leads me to the discovery that a filehandle is a THING in the same way an array or a scalar is a THING... well, now, that's interesting sez I, and turns back one page where I read

References to filehandles or directory handles can be created by referncing the typeglob of the same name

Well I'll be horn swoggled. Turning to my script, I add a line to the definition of my pdf object:
my $pdf = new PDF::Create( 'Version' => 1.2, 'Author' => 'me', 'Title' => 'Goom', 'fh' => *STDOUT, # this one );
... and now it works, just how I wanted, with the module in its un-butchered format. What were the chances of my blundering across the answer to this question, which has been bothering me for some time, just now?

§ George Sherston

Replies are listed 'Best First'.
Re: Re: PDF::Create - found a SOLUTION quite by chance!
by shotgunefx (Parson) on Jun 04, 2002 at 12:11 UTC
    That didn't even occur to me, I had a different problem than you were having, I wanted to pipe it through a tied GPG filehandle and ran into problems I'm assuming due to the tied filehandle interface so the hack might still come in handy for some.

    One of the things I ended up doing was a rudimentary line oriented PDF printer. (Generates the multiple pages, pagenums, headers and footers automatically). Not clean enough for CPAN yet but if there was some interest in it, I could take the time to polish it.

    -Lee

    "To be civilized is to deny one's nature."
Re: Re: PDF::Create - found a SOLUTION quite by chance!
by elwarren (Priest) on Jun 04, 2002 at 16:00 UTC
    Glad to know I'm not the only one that reads books backwards :-) One of these days my machines will crash and maybe I could try reading them from front to back...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found