Re: [PHP] Create PDFs with a strict layout automatically

2007-11-27 Thread David Christopher Zentgraf

On 27 Nov 2007, at 14:09, Brady Mitchell wrote:

I had a similar situation where I needed to fill in the blanks on an  
existing PDF file. I used the createFDF function from http://koivi.com/fill-pdf-form-fields 
 in combination with pdftk (http://www.accesspdf.com/pdftk/) to  
merge the fdf data and pdf file into one.


Take a look at the fill_form and flatten options of pdftk.


Thanks, but by now I'm pretty much sold on the idea of FPDF and  
creating PDFs on the fly, inserting data I need as I go. Is there any  
advantage using pdftk?


Chrs,
Dav

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create PDFs with a strict layout automatically

2007-11-27 Thread Brady Mitchell

David Christopher Zentgraf wrote:
Thanks, but by now I'm pretty much sold on the idea of FPDF and 
creating PDFs on the fly, inserting data I need as I go. Is there any 
advantage using pdftk?
The only advantage would be that others could create the PDFs and give 
them to you.


I used this setup to allow region offices to send me the PDF that they 
wanted to be used for generating reports for their users. I gave them a 
list of field names and they were able to choose which ones to include 
on the report, which order, etc.


FPDF is a great way to go - I've used it for other projects. Thought I'd 
share this method so you'd have more options. :)


Brady

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create PDFs with a strict layout automatically

2007-11-27 Thread David Christopher Zentgraf

On 27 Nov 2007, at 17:57, Brady Mitchell wrote:

FPDF is a great way to go - I've used it for other projects. Thought  
I'd share this method so you'd have more options. :)


Very much appreciated. :o)

I do want to include graphics dynamically as well, not just form data,  
so I think your approach wouldn't be quite as suited anyway(?).


Chrs,
Dav

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create PDFs with a strict layout automatically

2007-11-27 Thread Brady Mitchell

David Christopher Zentgraf wrote:

On 27 Nov 2007, at 17:57, Brady Mitchell wrote:

FPDF is a great way to go - I've used it for other projects. Thought 
I'd share this method so you'd have more options. :)


Very much appreciated. :o)

I do want to include graphics dynamically as well, not just form data, 
so I think your approach wouldn't be quite as suited anyway(?).
Yeah, it sounds like your project is better suited for FPDF than I 
originally thought. I saw template and that made me think of using 
pdftk to fill in PDFs generated elsewhere.


Brady

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread Chris

David Christopher Zentgraf wrote:

Hi,

I want to offer visitors of my site the possibility of downloading 
printable, foldable pocket guides for certain things that come out of my 
database. The problem is that items will be entered into the database 
very frequently, so I need to automate the process of creating these 
guides. Since they're supposed to work like flyers, with a proper front 
and back etc, the layout will need to be very strict and adhere to a 
template. I was thinking about PDFs, since they should keep their layout 
in print no matter what. But how would I create PDFs from a template on 
the fly using PHP?


There are a few packages you can use.

http://pear.php.net/package/File_PDF
http://www.fpdf.org/

are two I know of, I'm sure there are more.

If you have the choice maybe the php extension is an option:

http://php.net/pdf

but that requires a module be built into php.

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread David Christopher Zentgraf

On 27 Nov 2007, at 11:51, Chris wrote:


There are a few packages you can use.

http://pear.php.net/package/File_PDF
http://www.fpdf.org/

are two I know of, I'm sure there are more.


Thanks! The built-in PDFlib functions didn't seem to appealing, but  
FPDF looks pretty good. I'll certainly play around with it to see what  
it can do, but right of the bat it seems that templates aren't  
supported the way I would like them to. Importing a PDF is possible,  
but apparently they can only be treated like images.


Chrs,
Dav

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread tedd

At 11:46 AM +0900 11/27/07, David Christopher Zentgraf wrote:

Hi,

I want to offer visitors of my site the possibility of downloading 
printable, foldable pocket guides for certain things that come out 
of my database. The problem is that items will be entered into the 
database very frequently, so I need to automate the process of 
creating these guides. Since they're supposed to work like flyers, 
with a proper front and back etc, the layout will need to be very 
strict and adhere to a template. I was thinking about PDFs, since 
they should keep their layout in print no matter what. But how would 
I create PDFs from a template on the fly using PHP?

Or is HTML with a special print style sheet the better solution?

Anybody have any experience?

Chrs,
Dav


Dav:

It can be done, check this out:

http://webbytedd.com/bb/pdf/

I created this by using:

http://www.fpdf.org/

You could just as easily pull it from a dB.

Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread tedd

At 12:16 PM +0900 11/27/07, David Christopher Zentgraf wrote:

On 27 Nov 2007, at 11:51, Chris wrote:


There are a few packages you can use.

http://pear.php.net/package/File_PDF
http://www.fpdf.org/

are two I know of, I'm sure there are more.


Thanks! The built-in PDFlib functions didn't seem to appealing, but 
FPDF looks pretty good. I'll certainly play around with it to see 
what it can do, but right of the bat it seems that templates aren't 
supported the way I would like them to. Importing a PDF is possible, 
but apparently they can only be treated like images.


Chrs,
Dav



Dav:

You don't import the PDF's but rather create them on the fly.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread Bastien Koert

you could also look at http://www.digitaljunkies.ca/dompdf/
 
bastien CC: php-general@lists.php.net From: [EMAIL PROTECTED] To: [EMAIL 
PROTECTED] Date: Tue, 27 Nov 2007 12:16:45 +0900 Subject: Re: [PHP] Create 
PDFs with a strict layout automatically  On 27 Nov 2007, at 11:51, Chris 
wrote:   There are a few packages you can use.   
http://pear.php.net/package/File_PDF  http://www.fpdf.org/   are two I 
know of, I'm sure there are more.  Thanks! The built-in PDFlib functions 
didn't seem to appealing, but  FPDF looks pretty good. I'll certainly play 
around with it to see what  it can do, but right of the bat it seems that 
templates aren't  supported the way I would like them to. Importing a PDF is 
possible,  but apparently they can only be treated like images.  Chrs, Dav 
 --  PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 
_
Have fun while connecting on Messenger! Click here to learn more.
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger

Re: [PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread David Christopher Zentgraf

On 27 Nov 2007, at 12:25, Bastien Koert wrote:


you could also look at http://www.digitaljunkies.ca/dompdf/


Looks alright, but I'm wondering whether the results might be more  
accurate by laying the PDF out by hand, instead of going through an  
intermediary step with CSS? I was also looking at http://pdml.sourceforge.net 
 with the same mixed feelings.


Chrs,
Dav

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread Brady Mitchell

David Christopher Zentgraf wrote:
I'll certainly play around with it to see what it can do, but right of 
the bat it seems that templates aren't supported the way I would like 
them to. Importing a PDF is possible, but apparently they can only be 
treated like images.
I had a similar situation where I needed to fill in the blanks on an 
existing PDF file. I used the createFDF function from 
http://koivi.com/fill-pdf-form-fields in combination with pdftk 
(http://www.accesspdf.com/pdftk/) to merge the fdf data and pdf file 
into one.


Take a look at the fill_form and flatten options of pdftk.

Brady

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php