Re: [OT] pdf creation

2001-11-01 Thread Igor Sysoev

On Wed, 31 Oct 2001, Wim Kerkhoff wrote:

> Steve Smith wrote:
> > 
> > simran  writes:
> > > I believe there is also a Content-disposition tag you can use to
> > > tell the browser what to name the file...
> > 
> > As mentioned below in my original post, it doesn't work in all
> > browsers.
> 
> Like you say, PATH_INFO works for many browsers. I ran into issues with

It works for any browser. Browser doesn't no anything about PATH_INFO.

> IE not using it properly... I ended up having to tack "&MYPDFFILE.pdf"
> onto the end of the URI, just so that it would use the correct
> extension. Something to try perhaps. e.g.:
> 
> http://server/perl/pdfgen.pl/MYPDFFILE.pdf?&MYPDFFILE.pdf
> 
> In my case, I had to do this trick to get *.exe files to download as
> *.exe instead of *.com.

Why do you use "?&MYPDFFILE.pdf" ? I think that

http://server/perl/pdfgen.pl/MYPDFFILE.pdf

would be enough for MSIE.

Igor Sysoev




Re: [OT] pdf creation

2001-10-31 Thread Wim Kerkhoff

Steve Smith wrote:
> 
> simran  writes:
> > I believe there is also a Content-disposition tag you can use to
> > tell the browser what to name the file...
> 
> As mentioned below in my original post, it doesn't work in all
> browsers.

Like you say, PATH_INFO works for many browsers. I ran into issues with
IE not using it properly... I ended up having to tack "&MYPDFFILE.pdf"
onto the end of the URI, just so that it would use the correct
extension. Something to try perhaps. e.g.:

http://server/perl/pdfgen.pl/MYPDFFILE.pdf?&MYPDFFILE.pdf

In my case, I had to do this trick to get *.exe files to download as
*.exe instead of *.com.

In the couple of PDF scripts that I have written, I used other modules
to create a PostScript or PNG file, then used a system call to convert
it to a PDF.  For something that isn't being used very often this should
be acceptable. Once its a PDF on the system, the file can read in and
printed to STDOUT or a redirect to http://server/tmpfiles/$randomtmpfile
can be done.

-- 

Regards,

Wim Kerkhoff, Software Engineer
Merilus, Inc.  -|- http://www.merilus.com
Email: [EMAIL PROTECTED]



RE: [OT] pdf creation

2001-10-31 Thread Steve Smith

simran  writes:
> I believe there is also a Content-disposition tag you can use to
> tell the browser what to name the file...

As mentioned below in my original post, it doesn't work in all
browsers.

Steve



Re: [OT] pdf creation

2001-10-29 Thread Mike808

Dave Baker wrote:
> I ended up using htmldoc (http://www.easysw.com) which does html->pdf in a
> breeze (as well as html->ps).

So does HTML2PS, which is also GPL'd, and written in 100% Perl. Ghostscript or
the Acrobat reader can do the PS2PDF output.
See http://www.tdb.uu.se/~jan/html2ps.html

Mike808/
-- 
perl -le "$_='7284254074:0930970:H4012816';tr[0->][ BOPEN!SMUT];print"



Re: [OT] pdf creation

2001-10-29 Thread Dave Baker

> Does anyone have success/horror stories generating pdf files under 
> mod_perl?
> Recommendations?
>

No horror stories except trying to go about it the wrong way a few times
and ended up with multi-hundred megabyte TIFF files as intermediate steps.

I ended up using htmldoc (http://www.easysw.com) which does html->pdf in a
breeze (as well as html->ps).  Handy if you want to pdfify something that
you've already rendered into HTML for online display.

Dave

-- 

- Dave Baker  :  [EMAIL PROTECTED]  :  [EMAIL PROTECTED]  :  http://dsb3.com/ -
GnuPG:  1024D/D7BCA55D / 09CD D148 57DE 711E 6708  B772 0DD4 51D5 D7BC A55D




RE: [OT] pdf creation

2001-10-29 Thread Matt Sergeant

It's on CPAN already.

> -Original Message-
> From: Oleg Bartunov [mailto:[EMAIL PROTECTED]]
> Sent: 29 October 2001 09:40
> To: Matt Sergeant
> Cc: 'Lon Koenig'; [EMAIL PROTECTED]
> Subject: RE: [OT] pdf creation
> 
> 
> Matt,
> 
> do you have a plan to release PDFLib.pm ?

_
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.



RE: [OT] pdf creation

2001-10-29 Thread Oleg Bartunov

Matt,

do you have a plan to release PDFLib.pm ?

Oleg
On Mon, 29 Oct 2001, Matt Sergeant wrote:

> > -Original Message-
> > From: Lon Koenig [mailto:[EMAIL PROTECTED]]
> >
> > I apologize for the OT post, but the members of this list seem to be
> > authoritive resource for all web/perl solutions.
> >
> > I'm currently bidding a project, and the client's all in favor of a
> > mod_perl solution. Phase 2 of the project requires on-the-fly pdf
> > creation.
> >
> > I've done page layout in other languages, so I'm not too concerned
> > about coding the thing. My question is:
> >
> > Does anyone have success/horror stories generating pdf files
> > under mod_perl?
> > Recommendations?
>
> About 6 months ago I had a good look at the various modules available for
> PDF creation (for on the fly conversion of XML to PDF using AxKit/mod_perl),
> and found that they all suffered from C-like interfaces (i.e. it was
> $pdf->start_page, $pdf->end_page, instead of that stuff being automatic),
> interface complexity (i.e. changing font and colour mirrored how the
> low-level PDF format worked), and very poor support for incorporating
> images. Anyway, so I wrote my own, based on pdflib (www.pdflib.com), called
> PDFLib.pm. The base pdflib comes with it's own interface called
> pdflib_pl.pm, but again it's a C-like interface. So PDFLib.pm is more OO.
> Well, I'm biased, but I think it works pretty well (though it's lacking
> support for graphics primitives right now), and I use it in AxKit's AxPoint
> package to create all my slideshows (see
> http://217.158.50.178/docs/presentations/tpc2001/).
>
> One bonus about PDFLib.pm is that the underlying PDF stuff is all done in C,
> so it's likely a bit faster than all the other (pure perl) options.
>
> I've heard good stuff about PDF::Create though (but I think that's one of
> the ones that didn't support images when I was looking).
>
> Matt.
>
> _
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or alternatively call
> Star Internet for details on the Virus Scanning Service.
>

Regards,
Oleg
_
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83




RE: [OT] pdf creation

2001-10-29 Thread Matt Sergeant

> -Original Message-
> From: Lon Koenig [mailto:[EMAIL PROTECTED]]
> 
> I apologize for the OT post, but the members of this list seem to be 
> authoritive resource for all web/perl solutions.
> 
> I'm currently bidding a project, and the client's all in favor of a 
> mod_perl solution. Phase 2 of the project requires on-the-fly pdf 
> creation.
> 
> I've done page layout in other languages, so I'm not too concerned 
> about coding the thing. My question is:
> 
> Does anyone have success/horror stories generating pdf files 
> under mod_perl?
> Recommendations?

About 6 months ago I had a good look at the various modules available for
PDF creation (for on the fly conversion of XML to PDF using AxKit/mod_perl),
and found that they all suffered from C-like interfaces (i.e. it was
$pdf->start_page, $pdf->end_page, instead of that stuff being automatic),
interface complexity (i.e. changing font and colour mirrored how the
low-level PDF format worked), and very poor support for incorporating
images. Anyway, so I wrote my own, based on pdflib (www.pdflib.com), called
PDFLib.pm. The base pdflib comes with it's own interface called
pdflib_pl.pm, but again it's a C-like interface. So PDFLib.pm is more OO.
Well, I'm biased, but I think it works pretty well (though it's lacking
support for graphics primitives right now), and I use it in AxKit's AxPoint
package to create all my slideshows (see
http://217.158.50.178/docs/presentations/tpc2001/).

One bonus about PDFLib.pm is that the underlying PDF stuff is all done in C,
so it's likely a bit faster than all the other (pure perl) options.

I've heard good stuff about PDF::Create though (but I think that's one of
the ones that didn't support images when I was looking).

Matt.

_
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.



Re: [OT] pdf creation

2001-10-28 Thread John Armstrong

I once did a project using html2pdf under Unix. It worked great for 
converting the Human Resources forms ( in html ) to printable PDF's that 
contained variable user information.

Worked well and did not cause any real trouble.

John-

On Sunday, October 28, 2001, at 04:29 PM, Drew Taylor wrote:

> At 04:01 PM 10/28/2001 -0600, Lon Koenig wrote:
>> I apologize for the OT post, but the members of this list seem to be 
>> authoritive resource for all web/perl solutions.
>>
>> I'm currently bidding a project, and the client's all in favor of a 
>> mod_perl solution. Phase 2 of the project requires on-the-fly pdf 
>> creation.
>>
>> Does anyone have success/horror stories generating pdf files under 
>> mod_perl?
>> Recommendations?
>
> I've used PDFLib for several projects, and it works wonderfully. The 
> core is written in ANSI C with interfaces for every popular language. 
> It's not free, but it does a lot and works very well.
> http://www.pdflib.com/
>
>
> Drew Taylor JA[P|m_p|SQL]H
> http://www.drewtaylor.com/  Just Another Perl|mod_perl|SQL Hacker
> mailto:[EMAIL PROTECTED]  *** God bless America! ***
> ICQ: 135298242
>
>
>
>




Re: [OT] pdf creation

2001-10-28 Thread Drew Taylor

At 04:01 PM 10/28/2001 -0600, Lon Koenig wrote:
>I apologize for the OT post, but the members of this list seem to be 
>authoritive resource for all web/perl solutions.
>
>I'm currently bidding a project, and the client's all in favor of a 
>mod_perl solution. Phase 2 of the project requires on-the-fly pdf creation.
>
>Does anyone have success/horror stories generating pdf files under mod_perl?
>Recommendations?

I've used PDFLib for several projects, and it works wonderfully. The core 
is written in ANSI C with interfaces for every popular language. It's not 
free, but it does a lot and works very well.
http://www.pdflib.com/


Drew Taylor JA[P|m_p|SQL]H
http://www.drewtaylor.com/  Just Another Perl|mod_perl|SQL Hacker
mailto:[EMAIL PROTECTED]  *** God bless America! ***
ICQ: 135298242







Re: [OT] pdf creation

2001-10-28 Thread Steve Smith

> Does anyone have success/horror stories generating pdf files under
> mod_perl?  Recommendations?

I recently built a customer billing system system that generated PDF
invoices using Latex + Template-Toolkit.  See 

  http://template-toolkit.org/docs/blue/Manual/Filters.html

This was an backend system, but the files could easily be generated
online by simply wrapping the template processor in a handler with the
appropriate Content-Type: headers.

Tip: Although the Content-Disposition: header is supposed to tell the
browser the appropriate filename for the file, this doesn't actually
work in most browsers.  The solution is to extend the URL past the
handler/script, e.g. :

http://server/perl/pdfgen.pl/MYPDFFILE.pdf

Apache will dispatch this to pdfgen.pl, but the browser will assume
the default filename is MYPDFFILE.pdf.

Hope this helps,
Steve



[OT] pdf creation

2001-10-28 Thread Lon Koenig

I apologize for the OT post, but the members of this list seem to be 
authoritive resource for all web/perl solutions.

I'm currently bidding a project, and the client's all in favor of a 
mod_perl solution. Phase 2 of the project requires on-the-fly pdf 
creation.

I've done page layout in other languages, so I'm not too concerned 
about coding the thing. My question is:

Does anyone have success/horror stories generating pdf files under mod_perl?
Recommendations?


-- 
. . . . . . . . . . . . . . . . . . . . . . . .
Lon Koenig Consulting  [EMAIL PROTECTED]
(612) 965-6305 http://www.schnoggo.com