| 170 |
|
|
| 171 |
$file_name="{$form_name}.xfdf"; |
$file_name="{$form_name}.xfdf"; |
| 172 |
file_save_data($xfdf, "pdf_forms/{$file_name}", FILE_EXISTS_REPLACE); |
file_save_data($xfdf, "pdf_forms/{$file_name}", FILE_EXISTS_REPLACE); |
|
//readfile($host.'/files/pdf_forms/$content_type.xfdf'); |
|
| 173 |
|
|
| 174 |
header("Location: http://ocdevel.com/cgi-bin/to_pdf.sh.cgi?form={$form_name}&host={$host}"); |
$download_name=db_result(db_query("SELECT title FROM {node} WHERE nid=%d",$nid)); |
| 175 |
|
$download_name= preg_replace('/[^a-zA-Z0-9_]/','',$download_name).'.pdf'; |
| 176 |
|
|
| 177 |
|
header("Content-Type:application/pdf"); |
| 178 |
|
header('Content-disposition: attachment; filename='.$download_name); |
| 179 |
|
readfile("http://ocdevel.com/cgi-bin/to_pdf.sh.cgi?form={$form_name}&host={$host}"); |
| 180 |
|
|
| 181 |
|
//header("Location: http://ocdevel.com/cgi-bin/to_pdf.sh.cgi?form={$form_name}&host={$host}"); |
| 182 |
|
|
| 183 |
} |
} |
| 184 |
|
|