note 27192 added to ref.fdf

From: Date: Tue, 26 Nov 2002 18:18:03 +0000
Subject: note 27192 added to ref.fdf
Groups: php.notes 
Request: Send a blank email to php-notes+get-40006@lists.php.net to get a copy of this message
I tried a lot with FDF -> PDF and merging these documents... in my opinon xfdf is more handy than fdf... for those who'd like to try: feel free to use this little function to generate an xfdf document from an array. ToPPi function array2xfdf($xfdf_data, $pdf_file) { // Creates an XFDF File from a 2 dimensional // Array Format: "array ("key1" => "content1", "key2" => "content2"); $xfdf = "<?xml version='1.0' encoding='UTF-8'?>\n"; $xfdf .= "<xfdf xmlns='http://ns.adobe.com/xfdf/' xml:space='preserve'>\n"; $xfdf .= "<fields>\n"; // Loop -> Array to XFDF Data foreach ($xfdf_data as $key => $val) { $xfdf .= "<field name='".$key."'>\n"; $xfdf .= "<value>".$val."</value>\n"; $xfdf .= "</field>\n"; }; // XFDF "Footer" $xfdf .= "</fields>"; $xfdf .= "<f href='".$pdf_file."'/>"; $xfdf .= "</xfdf>"; return $xfdf; } -- http://www.php.net/manual/en/ref.fdf.php http://master.php.net/manage/user-notes.php?action=edit+27192 http://master.php.net/manage/user-notes.php?action=delete+27192 http://master.php.net/manage/user-notes.php?action=reject+27192

« previous php.notes (#40006) next »