php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61647 FDF/XFDF merging PDF Form on server.
Submitted: 2012-04-05 22:59 UTC Modified: 2016-07-03 04:22 UTC
Votes:16
Avg. Score:4.6 ± 0.7
Reproduced:15 of 15 (100.0%)
Same Version:4 (26.7%)
Same OS:13 (86.7%)
From: acool dot development at 10-network dot net Assigned: cmb (profile)
Status: No Feedback Package: PDF related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2012-04-05 22:59 UTC] acool dot development at 10-network dot net
Description:
------------
I have open this ticket to request a function/feature that I personally belive will benefit all the PHP community out there.

PDF has become the most popular way to universally provide and transfer reports, invoices, letters, CC statements and records; PHP needs an easy way to dynamically update PDF documents.

One way to update a PDF form template is by using FDF/XFDF plain text files. I am aware of the current PDF and FDF functions currently available in PHP, but none offers local rendering.

I've done my homework. A third party utility ( pdftk ) can be used along with PHP to obtained the desired results, and it's fairly easy. The following link is the original post that gives the code example:

http://stackoverflow.com/questions/1389964/merge-fdf-data-into-a-pdf-file-using-php

The only downside of this approach is the lack of support for pdftk in shared enviroments, adding this feature to PHP will likely make hosting companies to include it in their compilings. PHP is my prefered way of coding the web, adding cool tools and features will ensure PHP stays atop popularity.

Angel Cool





Test script:
---------------
header('Content-type: application/pdf'); 
header('Content-Disposition: attachment; filename="Statement.pdf"'); 
passthru("pdftk Template.pdf fill_form UpdatedFieldsUsingPHP.fdf output - "); 
exit; 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-21 20:21 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-06-21 20:21 UTC] cmb@php.net
Are you referring to
<https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/>?
 [2016-07-03 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC