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

Posting to another Site?
I have software that people install.
When they install it, is there a way to make it post their d

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

Retrieving innerHTML with cURL?
Hey all (sorry I know I'm a leecher, but I soon won't be. This is my first PHP project, but not my l

Significance of BPM
Hi Experts,
I am a novice in BPM , I just want to know how BPM as permenant department is

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

ScriptManager History and Opera Issue
I am having an issue in opera with the ScriptManager. I have a ScriptManager on a page with history

Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i

Not connecting to DB using ruby, error:env.c:257:in oci8lib.so: ORA-12154:
Hi All,

I am trying to connect to the database server from the client server using ruby and f

a multi dimensional array with for each
hi, I have been asked to write an array, I have Zone 2,3,4,5,6,7,8 each zone has 3 sections of weigh

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