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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

Contents of variable not echoing
Hey guys, hopefully this is an easy one...

In this line, the variables are not echoing out. T

I think i'm using the syntax incorrectly
Hi Everyone!

I'm new to this forum and a newbie with PHP - I'm glad I found this site - I hop

Dynamic Data + Sql Server 2005 Enterprise?
Hi! I have just started to learn ASP.NET, and it looks like it is quite a lot to learn. Im not reall

do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work

Empty text file when there is over XXXX lines of text.

define("RANDOM_FILE","/public_html/random.txt");
$randomEntry = "

quick question
Hi ..

i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a

why preg_match_all does not return the number of matches
My regex looks like

X[^x{4e00}-x{9fa5}]*Y

(where X and Y are two Chinese characters)

Automatically Detect Phone Model for WAP Jar Deployment
Making a wap site is fairly simple, but I'd like to know if there's a way to make it so that the wap

adding 0 to numbers
Hey guys i need to create a 00001 number in a loop. Is there a better way of forcing a 5 digit numbe

Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.

These usually span

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