I have tried the following code but it only downloads to Windows Word the actual {\rtf ... text. Can anyone help?
$cert_filename="certjrap.rtf" ; // Existing Certificate template
header ("Content-type: application/rtf") ;
header ("Content-Description: Your Certificate as an RTF File") ;
header ("Content-Disposition: inline; filename=yourcert.rtf") ;
$fp=fopen ($cert_filename, "r") ;
if ($fp) {
$cert=fread ($fp, filesize ($cert_filename)) ;
fclose ($fp) ;
$cert=str_replace("<<cert_name>>", $cert_name, $cert) ;
echo ($cert) ;
} else {
echo ("Unable to Find your Certificate.") ;
}
Word is unable to recognise the data as an rtf document.