Jump to content

toddmusicman

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

toddmusicman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I talked to the web host and they don't allow it. I'm having to look at other options. I just wanted to update the post just in case anyone using this script runs into this again.
  2. Finally got back to this. I think I know why this doesn't work for me. The web server I'm using won't allow for execution of .exe files. This seems to explain the problem, for me at least.
  3. No sure. But the FDF is writing and I have the permission set to write and execute. Did you have to change anything in the createFDF.php file? function createFDF($file,$info){ $data="%FDF-1.2\n%âãÏÓ\n1 0 obj\n<< \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>> \nendobj\ntrailer\n". "<<\n/Root 1 0 R \n\n>>\n%%EOF\n"; return $data; }
  4. Moved everything. I even tried to write the FDF to the same directory. The FDF shows up and I get an Array post on the page, but no pdf generated. I don't know what I'm doing wrong. I'm sure it something stupid.
  5. The exe and dll along with all of the php files are in the PDF directory. The FDF output files are routing to a directory (results) like this \pdf\results The FDF files are writing fine. I just can't get the PDF to generate. I'm going to try your suggestion.
  6. Still having some issues. It may be related to my directories. I'm not in the root. I'm running everything from a directory called PDF. Maybe I should just go to the root? This is what it looks like: if($fp=fopen($fdf_dir.'/'.$fdf_file,'w')){ fwrite($fp,$fdf_data,strlen($fdf_data)); echo $fdf_file,' written successfully.'; }else{ die('Unable to create file: '.$fdf_dir.'/'.$fdf_file); } $fdf_file="CMS".$focus->caseid.".fdf"; $pdf_file="CMS".$focus->caseid.".pdf"; $fdf_dir=".\\pdf\results\\"; exec('pdftk test.pdf fill_form '.$fdf_dir.$fdf_file.' output '.$fdf_dir.$pdf_file.' flatten'); exec('del '.$fdf_dir.$fdf_file); fclose($fp); } }else{ echo 'You did not submit a form.'; } ?>
  7. Okay, I've got everything in the same directory with the exception of the results directory. I'm missing the pdftk.exe and libiconv2.dll. That's probably what's wrong. I have time this afternoon to work on this, so I'm going to give it a shot. Thanks so much... Hope it works!
  8. Which part are you stuck on? I can generate the fdf no problem. Everything seems to work fine there. But I can't generate the PDF from there. Ty44ler adds additional code to the original which I thought would resolve the problem. I enter that and get syntax error at ?> Not sure why though. Thanx for any help though.
  9. Were you able to resolve this? This is driving me crazy. I think I'm at the same point you were when you were seeking help. Thanks for any help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.