Using php_fdf.dll with Xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Using php_fdf.dll with Xampp

Postby ehegarty » 27. April 2016 18:11

0
down vote
favorite
1
I have the most up to date version on Xampp (5.6.20). I have downloaded php_fdf.dll and fdftk.dll and placed them in C:\xampp\php, C:\xampp\ext\php, C:\xampp\apache\bin, C:\Windows\System32, and C:\Windows\SysWOW64.

I have them each in all of these places because of advice from various other forum posts. In my php.ini file, I have extension=fdftk.dll, and extension=php_fdf.dll with my extension directive as follows: extension_dir="c:\xampp\php\ext". I have even gone into my Paths on my computer's Environmental Variables and added C:\xampp\php\ext as a path.

Still every time that I try to utilize a function, say $fdf = fdf_create();, I get

Fatal error: Call to undefined function fdf_create() in C:\xampp\htdocs\processing.php on line 3

as well as this in the apache error log:

PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'fdftk.dll' in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\xampp\php\ext\php_fdf.dll' - The specified module could not be found.\r\n in Unknown on line 0

I'm somewhat new to programming, so it's entirely possible that there is something simple that I'm just not aware of, but I've looked through countless forum posts, youtube videos and Xampp, PHP and Apache documentation.

Please help! All I really need is to take HTML form data in my PHP script, then put it into a PDF. It seems like loading the HTML data as FDF with the same field names would be the easiest way to do this (as I had trouble getting PDF forms to communicate properly).
ehegarty
 
Posts: 4
Joined: 27. April 2016 18:03
XAMPP version: 5.6.20
Operating System: Windows 10

Re: Using php_fdf.dll with Xampp

Postby Altrea » 27. April 2016 20:40

Cross posting from here: http://stackoverflow.com/questions/36894722/php-fdf-dll-wont-work-in-xampp

cross posting (posting the same issue on multiple communities asking for help) is a very bad practice, especially on volunteer support channels like our board, especially without any reference to the other topic(s).

Why cross posting is bad
Helpers on each of the support channels are investing their free time and expert knowledge to try to help you with your problem. This can result in time waste for each of the support channels because of information or solving updates the other community don't get any knowledge of.

If you cross post, please follow these rules:
  • place a link on each of the communities to all of the other places you have posted your issue
  • keep all of the other communities up to date about new informations and solving activities, so each community can have a benefit from it
That way all communities can participate from all information and solutions and can generate a benefit from it.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Using php_fdf.dll with Xampp

Postby ehegarty » 27. April 2016 20:48

It's on reddit too: https://www.reddit.com/r/PHP/comments/4gpuba/repost_from_rwebdev_help_php_fdf_wont_work_in/
and: https://www.reddit.com/r/webdev/comments/4gpsbh/help_php_fdf_wont_work_in_xampp/

Not trying to waste anyone's time, just desperate for an answer.
ehegarty
 
Posts: 4
Joined: 27. April 2016 18:03
XAMPP version: 5.6.20
Operating System: Windows 10

Re: Using php_fdf.dll with Xampp

Postby Altrea » 27. April 2016 20:50

Thanks for providing the URLs to the other postings.

Now relating to your problem:

=> http://php.net/manual/en/fdf.installation.php
This extension is considered unmaintained and dead. However, the source code for this extension is still available within PECL SVN here: » http://svn.php.net/viewvc/pecl/fdf.



The code at PECL is 6 years old. Where did you find the dlls compatible with PHP 5.6-TS-VC14?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Using php_fdf.dll with Xampp

Postby ehegarty » 27. April 2016 21:03

source of my .dll: http://www.dlldll.com/php_fdf.dll_download.html
I saw that the page that you're referring to, but I see plenty of other posts (which could be pretty old) on forums that discuss people using FDFTK successfully. If these FDFTK functions are no longer workable, what is my solution? I would like to take submitted form data and populate an empty PDF form. Is there another way of handling FDF in PHP?
ehegarty
 
Posts: 4
Joined: 27. April 2016 18:03
XAMPP version: 5.6.20
Operating System: Windows 10

Re: Using php_fdf.dll with Xampp

Postby Altrea » 27. April 2016 21:23

Okay, so did you fit all requirements?

Did you install the SDK? http://php.net/manual/en/fdf.requirements.php
Did you add your dlls or PHP to your Windows PATH variable? http://php.net/manual/en/fdf.installation.php

ehegarty wrote:source of my .dll: http://www.dlldll.com/php_fdf.dll_download.html

Just a hint: I would not trust any dll site at the internet because the risk to get infekted with malware by manipulated dlls is present.

ehegarty wrote:but I see plenty of other posts (which could be pretty old) on forums that discuss people using FDFTK successfully.

Examples? How old are these posts? And which PHP versions do these people use?
I would guess that PHP versions since PHP 5.3 (the time PHP FDF is no longer bundles with PHP) can be a problem.

ehegarty wrote:If these FDFTK functions are no longer workable, what is my solution? I would like to take submitted form data and populate an empty PDF form. Is there another way of handling FDF in PHP?

There are multiple PDF solutions for PHP like the commercial but powerful PDFlib (https://www.pdflib.com/), or the free projects FPDF (http://www.fpdf.org/) or TCPDF (http://www.tcpdf.org/)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Using php_fdf.dll with Xampp

Postby ehegarty » 29. April 2016 20:27

Yes, I did install the SDK. I did add my dll to the Windows Path Variable. I agree, I was somewhat worried about downloading and running a dll from a random website, but I did and it didn't infect my computer. It also didn't work. The issue with the projects that you mentioned are that they are made to make and manipulate PDFs, not to fill forms. Previously there were PHP codes that could handle FDF data from a submitted PDF form and place them into the fields of a template form. I have discovered this costly component handles FDF data: https://www.setasign.com/products/setapdf-formfiller/pricing/
but I did not find any free or cheap options.
I was resistant to the idea of creating the PDF entirely with code. I designed my forms in InDesign and didn't want to lose that design-flexibility for the rigidity of code-designing. Having said that, I basically ended up doing it in HTML/CSS, because I'm much more comfortable designing with those.


In case anyone finds this in trying to accomplish the same task, here is what I am doing instead:
I am making the form in HTML and utilizing the $_POST variable with PHP to parse that data into my Database, then save a PHP/HTML page of the data. This PHP/HTML page I plan to heavily CSS in order to make it print nicely. At that point I just have to print the PHP/HTML page to PDF.
I was trying to avoid styling using CSS and HTML, but as long as the same browser is receiving and printing these PHP/HTML files to PDF, they ought to remain consistent. The difficulty now remains in styling an HTML page so that it prints nicely enough for presentation.

Thanks for your help Altrea
ehegarty
 
Posts: 4
Joined: 27. April 2016 18:03
XAMPP version: 5.6.20
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 91 guests

cron