Convert .fdf to .pdf


Posted on 16th Feb 2014 07:03 pm by admin

I currently have a web form that uploads the form data to an .fdf file and emails it.

However, I just realized that most people I email it to cannot open an .fdf and it needs to be in pdf.

Is there any way to convert an fdf file to pdf using php??


Here is my code which currently creates the .fdf:Code: function createFDF($file,$info){
$data="%FDF-1.2n%âãÏÓn1 0 objn<< n/FDF << /Fields [ ";
foreach($info as $field => $val){
if(is_array($val)){
$data.='<</T('.$field.')/V[';
foreach($val as $opt)
$data.='('.trim($opt).')';
$data.=']>>';
}else{
$data.='<</T('.$field.')/V('.trim($val).')>>';
}
}
$data.="] n/F (".$file.") /ID [ <".md5(time()).">n] >>".
" n>> nendobjntrailern".
"<<n/Root 1 0 R nn>>n%%EOFn";
return $data;
}

No comments posted yet

Your Answer:

Login to answer
172 Like 44 Dislike
Previous forums Next forums
Other forums

Text to picture Generator
Hello, i have found this script and it works really good^^ But i have one problem, i would like to c

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

Why is this query failing?
Why is this not working?
$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

Help with ORDER BY
Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

cURL and Sessions
Ohai.

So, I'm trying to cURL a bunch of things off of a page, and put them into a session. I'

The page should be expire when cilck back button
hi,
i'm new to php world.
i create user registration page.
when i submit it,data goes to my

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash