★ wanayoo — archive 1999 http://www.php.net/manual/de/function.fdf-create.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to FDF
Quick Reference
English version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
FDF
* fdf_open
* fdf_close
* fdf_create
* fdf_save
* fdf_get_value
* fdf_set_value
* fdf_next_field_name
* fdf_set_ap
* fdf_set_status
* fdf_get_status
* fdf_set_file
* fdf_get_file
Manual: fdf_create
View the source code for this pageSearch the site



Previous page
 fdf_close
 Updated
Sat, 12 Aug 2000
fdf_save 
Next page


fdf_create

(PHP3 >= 3.0.6, PHP4 )

fdf_create -- Create a new FDF document

Description

int fdf_create (void )

The fdf_create() creates a new FDF document. This function is needed if one would like to populate input fields in a PDF document with data.

Beispiel 1. Populating a PDF document


<?php
$outfdf = fdf_create();
fdf_set_value($outfdf, "volume", $volume, 0);

fdf_set_file($outfdf, "http:/testfdf/resultlabel.pdf");
fdf_save($outfdf, "outtest.fdf");
fdf_close($outfdf);
Header("Content-type: application/vnd.fdf");
$fp = fopen("outtest.fdf", "r");
fpassthru($fp);
unlink("outtest.fdf");
?>
     

See also fdf_close(), fdf_save(), fdf_open().


User Contributed Notes: fdf_create



10-Jul-2000 12:26
I am trying thissample code from the fdf_create() page. But outtest.fdf is never written to disk. Does anyone have any clues?


----------------------------


This is the code

<pre>
$outfdf = fdf_create();

fdf_set_value($outfdf, "project_title", $project_title, 0);


fdf_set_file($outfdf, "http:/fest.withoutabox.com/upload/FDF/lashortfest.pdf");

fdf_save($outfdf, "/home/web-content/fest.withoutabox.com/PDF/outtest.fdf");

fdf_close($outfdf);

/* Header("Content-type: application/vnd.fdf"); */

Header("Content-type: text/plain");

$fp = fopen("/home/web-content/fest.withoutabox.com/PDF/outtest.fdf", "r");

fpassthru($fp);

unlink("/home/web-content/fest.withoutabox.com/PDF/outtest.fdf");

</PRE>

---------------


Here is the output


<b>Warning</b>: fopen("/home/web-content/fest.withoutabox.com/PDF/outtest.fdf","r") - No such file or directory in <b>/home/web-content/fest.withoutabox.com/PDF/pdftest.php</b> on line <b>10</b>



<b>Warning</b>: Supplied argument is not a valid File-Handle resource in <b>/home/web-content/fest.withoutabox.com/PDF/pdftest.php</b> on line <b>11</b>



<b>Warning</b>: Unlink failed (No such file or directory) in <b>/home/web-content/fest.withoutabox.com/PDF/pdftest.php</b> on line <b>12</b>




 About Notes


Previous page
 fdf_close
 Updated
Sat, 12 Aug 2000
fdf_save 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.