[FX.php List] PDF Template? (for use with FPDF/FPDI)

Dale Bengston dbengston at preservationstudio.com
Wed Jan 31 12:17:53 MST 2007


Yes, you will have to position everything specifically to lay on the  
right part of the template. This involves a lot of x/y awareness and  
manipulation.

You should print your form from the platform that makes the best  
sense with regard to formatting. If it was designed on a Mac, make  
your PDF there. Once it's a PDF, the cross-platform font stuff is no  
longer relevant, as that information is embedded in the PDF.  
(Speaking of fonts, if you plan on applying fonts in FPDF besides the  
fonts included with FPDF, it's a process! This is not an issue with  
fonts used to create your templates.)

Yes, I am generating my on-screen proofs with GhostScript or  
ImageMagick so I can display them on the web. Most browsers do not  
support inline PDFs, and it's not acceptable to drop a PDF on the  
client's desktop every time they revise and re-proof.

Good luck,
Dale


On Jan 31, 2007, at 12:26 PM, Joel Shapiro wrote:

> Thanks everybody.  That's great that a PDF "template" for FPDI is  
> just a regular PDF file.
>
> I've already played a bit with FPDF.  In order to use FPDI, I'm  
> guessing I'll need to manually position every item (by pixel) that  
> will "layer" on top of the template, is that correct?  Are there  
> any tools to help with that?  The project I'm considering this for  
> prints report cards in a grid format, with each line getting an "x"  
> in one of three columns.  I'd need to position each "x" exactly, is  
> that right?
>
> Also:
> Does the OS makes a difference in PDF creation?  I know things  
> print differently on Mac vs. Windows -- in particular fonts/leading/ 
> etc.;  Will I have to take this into consideration when using FPDF/ 
> FPDI if I have a very exacting form to print?  If so, would the  
> version of font used be that of the Server or that of the User?   
> (i.e. on which OS(es?) would I need to create my template and/or  
> FPDF positioning?)
>
> & Dale:
> So you're creating a PDF using your MEGA FIRM template, and then  
> using GhostScript and/or ImageMagick to convert that PDF into a  
> JPEG, which you can then display within the web page (without the  
> user having to open a PDF), right?  That's very cool.
>
> Thanks,
> -Joel
>
>
> On Jan 31, 2007, at 7:05 AM, Dale Bengston wrote:
>
>> Hi David,
>>
>> Thanks for the Windows tip!
>>
>> FPDI does not require anything special about the condition or  
>> source of PDF templates. I've used everything from client- 
>> generated letterhead, documents scanned directly to PDF, complex  
>> multi-megabyte publication layouts, Mac/Windows sources - you name  
>> it. Basically, you use FPDI's capability to "import" the template  
>> (more like a layer, as you said) and then use FPDF's tools to  
>> write your dynamic content on top of it.
>>
>> I'm also using GhostScript and/or ImageMagick to create real-time  
>> screen proof JPEGs of the PDF just created. You can see a crude  
>> version of all this working in concert at:
>> 	http://www.streamline-studio.com/studio.php?cat=demos&loc=stationery
>>
>> Dale
>>
>> On Jan 31, 2007, at 7:20 AM, David Ness wrote:
>>
>>> I haven't used FPDI, but am a user of FPDF.
>>> Assuming that FPDI can use any standard pdf as a template file  
>>> (although
>>> my understanding is that using FPDI the pdf it acts more like a  
>>> 'layer'
>>> than a template); On Macs, the ability to create PDF's from any
>>> printable document is built into the OS, so that should work. On a
>>> Windows PC, I use a freeware product called PDFCreator. Please  
>>> post back
>>> if FPDI requires something special about the template PDF file,  
>>> as I'm
>>> about to start a project that will utilize FPDI.
>>>
>>> http://sourceforge.net/projects/pdfcreator/
>>>
>>> Hope this helps.
>>>
>>>
>>> --
>>> David Ness,
>>> Database Systems Programmer
>>>
>>> Bonded Builders Warranty Group
>>> 1500 Kings Highway
>>> Port Charlotte, FL 33980
>>> 800.749.0381 x3123 (National Toll Free)
>>> 941.255.3274 x3123 (Local)
>>>
>>>
>>> -----Original Message-----
>>> From: fx.php_list-bounces at mail.iviking.org
>>> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Joel  
>>> Shapiro
>>> Sent: Wednesday, January 31, 2007 1:26 AM
>>> To: FX.php Discussion List
>>> Subject: [FX.php List] PDF Template? (for use with FPDF/FPDI)
>>>
>>> Hi all
>>>
>>> When using FPDF & FPDI -- as in Dale's post below -- is a "PDF  
>>> template"
>>> something that has to be created with a tool like Adobe Acrobat
>>> Professional, or are there other ways to create such a PDF template?
>>>
>>> TIA,
>>> -Joel
>>>
>>>
>>> On Dec 24, 2006, at 11:48 AM, Dale Bengston wrote:
>>>
>>>> FPDI allows you to take an existing PDF template and then build  
>>>> on top
>>>
>>>> of it with FPDF. The simplest example is of a letter created with
>>>> FileMaker data, where the art for your letterhead (header and  
>>>> footer,
>>>> for example) is in a template. FPDI lifts up the template and  
>>>> makes it
>>>
>>>> available as a "bed" to FPDF, so it can draw your dynamic letter
>>>> content. FPDF then saves the composited PDF to the location you
>>>> specify.
>>>>
>>>> Note that FPDF does not support templates by itself. You can  
>>>> build an
>>>> entire PDF from scratch with FPDF, but unless you extend it with  
>>>> FPDI,
>>>
>>>> you will not be able to use a pre-made template.
>>>>
>>>> Hope this helps,
>>>> Dale
>>>
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list