Re: PDF generation

2002-04-20 Thread David Wheeler

On 4/19/02 10:33 PM, Stas Bekman [EMAIL PROTECTED] claimed:

 If your end goal is PS, better generated PS in first place. From my
 experience
 ps - pdf - ps, makes the final PS a much bigger file (5-10 times
 bigger). I use html2ps for generating PS files (used for generating the
 mod_perl guide's pdf).

Actually, I realized the same thing yesterday. I'm looking at possibly just
using PostScript::Document to create PS and forgetting about PDF for now.

Regards,

David

-- 
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/  Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]





Re: PDF generation

2002-04-19 Thread David Wheeler

On Wed, 03 Apr 2002 16:01:24, Drew Taylor [EMAIL PROTECTED] wrote:

 I can highly recommend PDFLib. It's not quite free in that you have to buy
 a license if you make a product out of it, but it's still cheap. Matt
 Sergeant has recently added an OO interface over the PDFLib functions with
 PDFLib. http://search.cpan.org/search?dist=PDFLib

This looks pretty good to me. Can anyone suggest how I might programmtically
send a PDF to a printer once I've generated it in Perl/mod_perl?

Thanks,

David

-- 
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/  Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]





Re: PDF generation

2002-04-19 Thread Sam Tregar

On Fri, 19 Apr 2002, Andrew Ho wrote:

 DWThis looks pretty good to me. Can anyone suggest how I might
 DWprogrammtically send a PDF to a printer once I've generated it in
 DWPerl/mod_perl?

 Use either Ghostscript or Adobe Acrobat Reader to convert to Postscript,
 then print in your normal manner (if you usually use Ghostscript as a
 print filter anyway, you can just print directly using it). For Adobe
 Acrobat Reader, use the -toPostScript option.

Use Acrobat Reader if you can.  The font support is significantly better
in my experience, at least under Linux.

-sam




Re: PDF generation

2002-04-19 Thread Stas Bekman

Andrew Ho wrote:
 Hello,
 
 DWThis looks pretty good to me. Can anyone suggest how I might
 DWprogrammtically send a PDF to a printer once I've generated it in
 DWPerl/mod_perl?
 
 Use either Ghostscript or Adobe Acrobat Reader to convert to Postscript,
 then print in your normal manner (if you usually use Ghostscript as a
 print filter anyway, you can just print directly using it). For Adobe
 Acrobat Reader, use the -toPostScript option.

If your end goal is PS, better generated PS in first place. From my 
experience
ps - pdf - ps, makes the final PS a much bigger file (5-10 times 
bigger). I use html2ps for generating PS files (used for generating the 
mod_perl guide's pdf).

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: PDF generation

2002-04-12 Thread Robin Berjon

On Wednesday 03 April 2002 22:43, Bill McCabe wrote:
 I have a large number of mod_perl modules that connect to various databases
 and generate workflow performance reports for my organization. I give the
 users 3 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For
 PDF output I've been using PDF::Create, which has been at version .01 since
 1999. It has worked flawlessly for my purposes for a couple of years, but
 is very limited. In fine form-follows-function fashion, the end users would
 now like the PDF output gussied up with graphics, etc. Does anyone have any
 strong (positive or negative) recommendations for which module(s) I should
 migrate to?

Sorry to answer so late, I've been offline. It would seem, unless I missed 
something from the thread, that no one mentionned AxPoint. It's originally 
create to generate slides but it can do more. The latest version adds some 
SVG support for graphics, which means you could reuse the same code to 
generate web graphics. It's a really good bundle, especially if you're not 
too fond of coding to the PDF API.

-- 
___
Robin Berjon [EMAIL PROTECTED] -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
---
Always remember you're unique just like everyone else.




Re: PDF generation

2002-04-08 Thread Patrick

On Sun, Apr 07, 2002 at 07:51:42PM +0200, Thomas Eibner took time to write:
  More precisely I have LaTeX templates, I use CGI::FastTemplate to
  fill them in with dynamic data, run pdflatex, and then have a nice
  PDF file.
 
 Sounds like an interesting solution, but how long does it take to
 generate the pdf files? I need something that will insert data into

Few seconds, at least for my cases (and by doing PUSHs to the Web
client it let it know exactly where we are at the generation).

You should also consider, if possible, to generate files in advance
of use.

 PDF's at certain positions (they may change) and I was looking wheter
 it would be possible doing something like CGI::FastTemplate just for
 PDF's. The only requirement would be that you could use _any_ program
 that generates PDF's to generate these templates. So I built part of a
 PDF parser that would extract the text portions of a PDF, but then I
 found that a PDF generated by Adobe Distiller (just as an example)
 generates text sections that look something like:
 [(Kv)25.1(ar r)9.9(adioj mangxas la fla)20(v)24.8(a)]
 for the simple text of Kvar radioj mangxas la flava. 
 Doesn't that just look hopeless to parse? I'm about to give up on this
 solution, any comments?

I also think that should not mess with the PDF output directly.
Because it looks like text, but as you show yourself, it is in fact
more complicated. 

Patrick.



Re: PDF generation

2002-04-08 Thread Thomas Eibner

On Mon, Apr 08, 2002 at 01:32:58PM +0200, Patrick wrote:
 Few seconds, at least for my cases (and by doing PUSHs to the Web
 client it let it know exactly where we are at the generation).

Okay, that sounds bareable.

 You should also consider, if possible, to generate files in advance
 of use.

That would have been a possibility if there wasn't such a high impact
when you generate the statistics I need.

 I also think that should not mess with the PDF output directly.
 Because it looks like text, but as you show yourself, it is in fact
 more complicated. 

That is true, but it's a fine line between either having to do ALL the
work everytime a layout has to change (try getting any of your 
graphical designers to make a layout in LaTeX :( ) or just parsing a
PDF. And since placing content at an absolute position isn't really an
option either it's not possible just to import the PDF and then write
the information needed to the document. 

I wonder how much PDI from pdflib.org will do..

-- 
  Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/
  mod_pointer http://stderr.net/mod_pointer http://photos.eibner.dk/



RE: PDF generation

2002-04-08 Thread Jeff

Of course others have already told you about Text::PDF, and no doubt
you googled the group Yahoo!

http://groups.yahoo.com/group/perl-text-pdf-modules/messages

You can do anything you want with PDFs, but the interface is hard to
grok
and you really need to wrap it.

I have a framework that we use to pull info from a database on-the-fly, 
and generate either Excel spreadsheets, Text dumps or PDFs. It ain't 
really ready for public primetime. 

I put out a message about 6 months ago in the PDF list asking if anyone 
wanted to co-operate with me on getting it ready for realworld. 
The goal is to be able to create some relatively simple Perl structures 
and then throw them at a Spreadsheet, PDF, HTML or other rendering
engine 
and reap the rewards!

The doc tree used [i.e. Perl structures] leant heavily on the CSS
analysis
done by the w3 guys on how to organise layout and styles etc in such a
way as to be independent of the ultimate rendering environment.

Here is the post where I postulate an ideal universe where data is 
automagically formatted in wondrous tabular PDF prose...

http://groups.yahoo.com/group/perl-text-pdf-modules/message/468

mail me direct if you want to help take it further.

Regards
Jeff 


-Original Message-
From: Thomas Eibner [mailto:[EMAIL PROTECTED]] 
Sent: 08 April 2002 13:47
To: modperl
Subject: Re: PDF generation


On Mon, Apr 08, 2002 at 01:32:58PM +0200, Patrick wrote:
 Few seconds, at least for my cases (and by doing PUSHs to the Web
 client it let it know exactly where we are at the generation).

Okay, that sounds bareable.

 You should also consider, if possible, to generate files in advance
 of use.

That would have been a possibility if there wasn't such a high impact
when you generate the statistics I need.

 I also think that should not mess with the PDF output directly.
 Because it looks like text, but as you show yourself, it is in fact
 more complicated. 

That is true, but it's a fine line between either having to do ALL the
work everytime a layout has to change (try getting any of your 
graphical designers to make a layout in LaTeX :( ) or just parsing a
PDF. And since placing content at an absolute position isn't really an
option either it's not possible just to import the PDF and then write
the information needed to the document. 

I wonder how much PDI from pdflib.org will do..

-- 
  Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/
  mod_pointer http://stderr.net/mod_pointer http://photos.eibner.dk/





Re: PDF generation

2002-04-07 Thread Thomas Eibner

On Sun, Apr 07, 2002 at 02:11:39AM +0200, Patrick wrote:
 On Wed, Apr 03, 2002 at 03:43:39PM -0500, Bill McCabe took time to write:
  I have a large number of mod_perl modules that connect to various databases and
  generate workflow performance reports for my organization. I give the users 3
  output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output
  I've been using PDF::Create, which has been at version .01 since 1999. It has
  worked flawlessly for my purposes for a couple of years, but is very limited. In
  fine form-follows-function fashion, the end users would now like the PDF output
  gussied up with graphics, etc. Does anyone have any strong (positive or
  negative) recommendations for which module(s) I should migrate to?
 
 I do not use Perl modules to do that, but LaTeX.
 As ugly as it may sound it enables to output very complex PDF files,
 exactly the way you want.
 
 More precisely I have LaTeX templates, I use CGI::FastTemplate to
 fill them in with dynamic data, run pdflatex, and then have a nice
 PDF file.

Sounds like an interesting solution, but how long does it take to
generate the pdf files? I need something that will insert data into
PDF's at certain positions (they may change) and I was looking wheter
it would be possible doing something like CGI::FastTemplate just for
PDF's. The only requirement would be that you could use _any_ program
that generates PDF's to generate these templates. So I built part of a
PDF parser that would extract the text portions of a PDF, but then I
found that a PDF generated by Adobe Distiller (just as an example)
generates text sections that look something like:
[(Kv)25.1(ar r)9.9(adioj mangxas la fla)20(v)24.8(a)]
for the simple text of Kvar radioj mangxas la flava. 
Doesn't that just look hopeless to parse? I'm about to give up on this
solution, any comments?

-- 
  Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/
  mod_pointer http://stderr.net/mod_pointer http://photos.eibner.dk/



Re: PDF generation

2002-04-06 Thread Patrick

On Wed, Apr 03, 2002 at 03:43:39PM -0500, Bill McCabe took time to write:
 I have a large number of mod_perl modules that connect to various databases and
 generate workflow performance reports for my organization. I give the users 3
 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output
 I've been using PDF::Create, which has been at version .01 since 1999. It has
 worked flawlessly for my purposes for a couple of years, but is very limited. In
 fine form-follows-function fashion, the end users would now like the PDF output
 gussied up with graphics, etc. Does anyone have any strong (positive or
 negative) recommendations for which module(s) I should migrate to?

I do not use Perl modules to do that, but LaTeX.
As ugly as it may sound it enables to output very complex PDF files,
exactly the way you want.

More precisely I have LaTeX templates, I use CGI::FastTemplate to
fill them in with dynamic data, run pdflatex, and then have a nice
PDF file.

Good luck in your search.

Patrick.



Re: PDF generation (fwd)

2002-04-06 Thread Jim Willis

I have had a tremendous amount of success with htmldoc. see: 
http://www.easysw.com/htmldoc/ (it's gpl'd and has fairly decent 
documentation).
not a module, but can be easily called from cgi-bin, etc and handles 
formatting really well. you design your output in html and pass it to 
htmldoc and out comes a pdf.
good luck
jim willis


-- Forwarded message --
Date: Wed,  3 Apr 2002 15:43:39 -0500
From: Bill McCabe [EMAIL PROTECTED]
To: modperl [EMAIL PROTECTED]
Subject: PDF generation

Hi All

I have a large number of mod_perl modules that connect to various 
databases and
generate workflow performance reports for my organization. I give the users 3
output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output
I've been using PDF::Create, which has been at version .01 since 1999. It has
worked flawlessly for my purposes for a couple of years, but is very 
limited. In
fine form-follows-function fashion, the end users would now like the 
PDF output
gussied up with graphics, etc. Does anyone have any strong (positive or
negative) recommendations for which module(s) I should migrate to?


TIA,
Bill


-- 



Re: PDF generation

2002-04-04 Thread Perrin Harkins

Mike808 wrote:
 Don't know if you can run a JServ+mod_perl or JPerl hybrid, though.

You can, but it would be the biggest memory hog every created, since it 
would be running a JVM in addition to the Perl interpreters.

- Perrin






Re: PDF generation

2002-04-04 Thread Graham TerMarsch

On April 3, 2002 12:43 pm, Bill McCabe wrote:
 I have a large number of mod_perl modules that connect to various
 databases and generate workflow performance reports for my organization.
 I give the users 3 output options: HTML, Excel
 (Spreadsheet::WriteExcel), and PDF. For PDF output I've been using
 PDF::Create, which has been at version .01 since 1999. It has worked
 flawlessly for my purposes for a couple of years, but is very limited.
 In fine form-follows-function fashion, the end users would now like the
 PDF output gussied up with graphics, etc. Does anyone have any strong
 (positive or negative) recommendations for which module(s) I should
 migrate to?

We've been using the Text::PDF modules here ourselves on several projects, 
all with great success.  Is a bit low-level, though, which may not be 
quite what you're looking for.  There's also a Text::PDF::API2 package on 
CPAN which takes the low-level stuff and presents a higher-level API to 
help you in building up your PDF documents.  We needed something that'd 
give us ultimate low-level control over PDF entities so we went with 
Text::PDF ourselves, but both of them work quite well.

-- 
Graham TerMarsch
Howling Frog Internet Development, Inc.   http://www.howlingfrog.com

// -
// DEC diagnostics would run on a dead whale. -- Mel Ferentz 
// -




RE: PDF generation

2002-04-04 Thread Wilson, Allen

In reference to PDF::Create...

Has anyone found any good documentation behind the module...

I would like to print the results of a query to PDF and I not exactly
sure whether I can use an array or a concatenate the results in a
string.

Allen

-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:39 AM
To: Mike808
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: PDF generation


Mike808 wrote:
 Don't know if you can run a JServ+mod_perl or JPerl hybrid, though.

You can, but it would be the biggest memory hog every created, since it 
would be running a JVM in addition to the Perl interpreters.

- Perrin





This message may contain proprietary or confidential company information.
Any unauthorized use or disclosure is prohibited.




RE: PDF generation

2002-04-04 Thread Bill McCabe

On 4/4/02 at 1:07 PM, [EMAIL PROTECTED] (Wilson, Allen) wrote:

 In reference to PDF::Create...
 
 Has anyone found any good documentation behind the module...
 
 I would like to print the results of a query to PDF and I not exactly
 sure whether I can use an array or a concatenate the results in a
 string.
 
 Allen
 

AFAIK, the only docs are what comes with the distribution. For tabluar reports,
I retrieve all my results as array's which get fed to a function that calculates
x,y pixel offsets and print each item to its position. If you want to make a
string out of each row, you'll have to use a fixed width font and calculate the
needed spaces to pad each column and you'll still need to track vertical pixel
position for each row, so it didn't seem to be  much less work to me to go that
route. 

Anyway, as I pointed out in my initial question, though PDF::Create has worked
flawlessly for me for the last two years, it definitely seems to have been
orphaned by its creator. If you're just getting started with perl-PDF
generation, why not choose one of those recommended in this thread? My
inclination would be use Matt Sergeant's PDFlib which seems well designed, but I
have a (probably unjustifiable) knee-jerk reaction against having to license
products. So, I'll give PDF::API2 a whack.

Bill



PDF generation

2002-04-03 Thread Bill McCabe

Hi All

I have a large number of mod_perl modules that connect to various databases and
generate workflow performance reports for my organization. I give the users 3
output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output
I've been using PDF::Create, which has been at version .01 since 1999. It has
worked flawlessly for my purposes for a couple of years, but is very limited. In
fine form-follows-function fashion, the end users would now like the PDF output
gussied up with graphics, etc. Does anyone have any strong (positive or
negative) recommendations for which module(s) I should migrate to?


TIA,
Bill



Re: PDF generation

2002-04-03 Thread Thomas Eibner

On Wed, Apr 03, 2002 at 03:43:39PM -0500, Bill McCabe wrote:
 Hi All
 
 I have a large number of mod_perl modules that connect to various databases and
 generate workflow performance reports for my organization. I give the users 3
 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output
 I've been using PDF::Create, which has been at version .01 since 1999. It has
 worked flawlessly for my purposes for a couple of years, but is very limited. In
 fine form-follows-function fashion, the end users would now like the PDF output
 gussied up with graphics, etc. Does anyone have any strong (positive or
 negative) recommendations for which module(s) I should migrate to?

I've had good success with PDFLib http://www.pdflib.org/, but the
license isn't what one could have hoped for :-/ Matt Sergeant wrote an
OO interface to pdflib_pl.pm which is what I am using.

-- 
  Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/
  mod_pointer http://stderr.net/mod_pointer http://photos.eibner.dk/



Re: PDF generation

2002-04-03 Thread siberian

I have used the HTMLtoPDF converter  from htmldoc ( 
http://www.os2site.com/sw/util/convert/ ) with great 
success. 

I also have used html2ps and ps2pdf to make this 
transition as well using ImageMagick ( 
http://www.imagemagick.org/ ).

Its a really nice approache since it essentially makes the 
sky the limit on your PDF presentation. We did an HR 
process for a company once where the users would answer a 
bunch of questions and end up with a PDF on their desktop 
to print, sign and hand to HR.

John-

On Wed,  3 Apr 2002 15:43:39 -0500
  Bill McCabe [EMAIL PROTECTED] wrote:
Hi All

I have a large number of mod_perl modules that connect to 
various databases and
generate workflow performance reports for my 
organization. I give the users 3
output options: HTML, Excel (Spreadsheet::WriteExcel), 
and PDF. For PDF output
I've been using PDF::Create, which has been at version 
.01 since 1999. It has
worked flawlessly for my purposes for a couple of years, 
but is very limited. In
fine form-follows-function fashion, the end users would 
now like the PDF output
gussied up with graphics, etc. Does anyone have any 
strong (positive or
negative) recommendations for which module(s) I should 
migrate to?


TIA,
Bill




Re: PDF generation

2002-04-03 Thread Drew Taylor

I can highly recommend PDFLib. It's not quite free in that you have to buy 
a license if you make a product out of it, but it's still cheap. Matt 
Sergeant has recently added an OO interface over the PDFLib functions with 
PDFLib. http://search.cpan.org/search?dist=PDFLib

There are others that will convert HTML into PDF, but I prefer the precise 
options available with PDFLib.

Drew

At 03:43 PM 4/3/02 -0500, Bill McCabe wrote:
Hi All

I have a large number of mod_perl modules that connect to various 
databases and
generate workflow performance reports for my organization. I give the users 3
output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output
I've been using PDF::Create, which has been at version .01 since 1999. It has
worked flawlessly for my purposes for a couple of years, but is very 
limited. In
fine form-follows-function fashion, the end users would now like the PDF 
output
gussied up with graphics, etc. Does anyone have any strong (positive or
negative) recommendations for which module(s) I should migrate to?


TIA,
Bill




Re: PDF generation

2002-04-03 Thread Robert Landrum

At 3:43 PM -0500 4/3/02, Bill McCabe wrote:
Hi All

I have a large number of mod_perl modules that connect to various 
databases and
generate workflow performance reports for my organization. I give the users 3
output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output
I've been using PDF::Create, which has been at version .01 since 1999. It has
worked flawlessly for my purposes for a couple of years, but is very 
limited. In
fine form-follows-function fashion, the end users would now like the 
PDF output
gussied up with graphics, etc. Does anyone have any strong (positive or
negative) recommendations for which module(s) I should migrate to?

Actually, I used PDF::API2.   I've used it for graphics and others 
and have contributed patches to the source (which may or may not have 
been included, but which aren't critical for general use).

The only downside is that it is poorly documented (in my opinion), 
but determination overruled and  I've used it quite for all types of 
applications (including dynamic fill-out-and-download applications).

The speed isn't great, but if it's a low traffic application, it 
shouldn't be a problem.

Rob

--
When I used a Mac, they laughed because I had no command prompt. When 
I used Linux, they laughed because I had no GUI.  



Re: PDF generation

2002-04-03 Thread Kurt Hansen

Hi y'all,

 At 3:43 PM -0500 4/3/02, Bill McCabe wrote:

 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF
output
 I've been using PDF::Create, which has been at version .01 since 1999. It
has
 worked flawlessly for my purposes for a couple of years, but is very
 limited. In
 fine form-follows-function fashion, the end users would now like the
 PDF output
 gussied up with graphics, etc. Does anyone have any strong (positive or
 negative) recommendations for which module(s) I should migrate to?

 Robert Landrum wrote:
 Actually, I used PDF::API2.   I've used it for graphics and others
 and have contributed patches to the source (which may or may not have
 been included, but which aren't critical for general use).

 The only downside is that it is poorly documented (in my opinion),
 but determination overruled and  I've used it quite for all types of
 applications (including dynamic fill-out-and-download applications).

 The speed isn't great, but if it's a low traffic application, it
 shouldn't be a problem.

Just wanted to second Robert's recommendation. We use PDF::API2 as well for
a client, and it arrived just in time. The key for us was that PDF::API2
allows us to edit a PDF file, so we can start with a template and just make
a few changes. We needed to be able to start with a PDF file supplied by a
client and just make some edits to the file on the fly based on user input.

It's a bit less stable than other modules I've used, but it's young and
rapidly improving.

Take care,

Kurt Hansen
[EMAIL PROTECTED]






Re: PDF generation

2002-04-03 Thread Mike808

[EMAIL PROTECTED] wrote:
 I also have used html2ps and ps2pdf to make this
 transition as well using ImageMagick (
 http://www.imagemagick.org/ ).
 
 Its a really nice approache since it essentially makes the
 sky the limit on your PDF presentation. We did an HR
 process for a company once where the users would answer a
 bunch of questions and end up with a PDF on their desktop
 to print, sign and hand to HR.

Ditto. 4 years ago, insurance qualifier for a brokerage firm.
The HTML-PDF made a nice what you see on your screen is what printed
at the home office for the users. And the home office loved not having
to decipher mangled handwritten faxes.

Another product I've used for (gasp) Java is Root River systems.
Very nice report-writer type API with decent page-flow behaviours.
Don't know if you can run a JServ+mod_perl or JPerl hybrid, though.

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



Re: PDF generation

2002-04-03 Thread Ged Haywood

Hi there,

On Wed, 3 Apr 2002, Mike808 wrote:

 Don't know if you can run a JServ+mod_perl or JPerl hybrid, though.

You can certainly run Java on one server and mod_perl on another, I do
this routinely in production.  (With mod_perl on the FRONT end... :)

73,
Ged.