Thanks, I tried it and don't get a blank line but it still shows all the code when opened in word. Forgive how lengthy it is but here is the actual code: I tried escaping the special characters in the string but that doesn't help either.
Thanks, Eddie <? touch("documents\off.rtf"); $fp=fopen("documents\off.rtf",wb); $outputstring="{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\pano se 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} {\f57\froman\fcharset238\fprq2 Times New Roman CE;}{\f58\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f60\froman\fcharset161\fprq2 Times New Roman Greek;}{\f61\froman\fcharset162\fprq2 Times New Roman Tur;} {\f62\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f63\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f64\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f65\fswiss\fcharset238\fprq2 Arial CE;}{\f66\fswiss\fcharset204\fprq2 Arial Cyr;} {\f68\fswiss\fcharset161\fprq2 Arial Greek;}{\f69\fswiss\fcharset162\fprq2 Arial Tur;}{\f70\fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f71\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f72\fswiss\fcharset186\fprq2 Arial Baltic;}} {\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\r ed0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green 255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue1 28;\red0\green128\blue0; \red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\g reen128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}{\s15\qc \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 Title;}}{\info{\title Leave Form}{\author William Bounds}{\operator Ed Peloke}{\creatim\yr2002\mo12\dy30\hr16\min52}{\revtim\yr2002\mo12\dy30\hr16\ min52}{\version2}{\edmins0}{\nofpages1}{\nofwords67}{\nofchars383} {\*\company Echo Management Group}{\nofcharsws470}{\vern8247}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expsh rtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dghspace180\dgvspac e180\dghorigin1701\dgvorigin1984\dghshow0\dgvshow0 \jexpand\viewkind1\viewscale75\pgbrdrhead\pgbrdrfoot\nolnhtadjtbl \fet0\sectd \linex0\endnhere\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3 \pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl 5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}} {\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s15\qc \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Leave Form \par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1 \par }\pard \ql \li0\ri0\widctlpar\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f1\fs24 \par Name:\tab Eddie Peloke}{\f1\fs24\ul \tab \tab \tab \tab \tab \par \par }{\f1\fs24 Date:\tab 10/15/02}{\f1\fs24\ul \tab \tab \tab \tab \tab \par }{\f1\fs24 \par First Date Absent:}{\f1\fs24\ul \tab 10/16/02\tab \tab }{\f1\fs24 \tab Expected Return Date:}{\f1\fs24\ul 10/17/02\tab \par }{\f1\fs24 \par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f1\fs24 \par }\pard \ql \li0\ri0\widctlpar\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f1\fs24 Please indicate the number of days requested for each type of leave: \par \par \par }\pard \ql \fi720\li0\ri0\widctlpar\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f1\fs24\ul 1/2\tab }{\f1\fs24 Vacation\tab \tab }{ \f1\fs24\ul \tab }{\f1\fs24 Jury Duty \par \par }{\f1\fs24\ul \tab }{\f1\fs24 Sick\tab \tab \tab }{\f1\fs24\ul \tab }{\f1\fs24 Funeral \par \par }{\f1\fs24\ul \tab }{\f1\fs24 Personal\tab \tab }{\f1\fs24\ul \tab }{\f1\fs24 Unpaid Leave \par \par }{\f1\fs24\ul \tab }{\f1\fs24 Other \par }\pard \ql \li0\ri0\widctlpar\brdrt\brdrs\brdrw10\brsp20 \brdrl\brdrs\brdrw10\brsp80 \brdrb\brdrs\brdrw10\brsp20 \brdrr\brdrs\brdrw10\brsp80 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f1\fs24 \par \par Explanation, if necessary:}{\f1\fs24\ul \tab \tab \tab \tab \tab \tab \par \par \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \par \par \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \par \par \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \par \par \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \par \par \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \par \par \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \par \par \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \tab \par \par \tab \tab \tab \tab \tab \tab \par Dat}{\f1\fs24 e:\tab }{\f1\fs24\ul \tab \tab }{\f1\fs24 \tab Supervisor:}{\f1\fs24\ul \tab \tab \tab \tab \tab \tab }{\f1\fs24 \par \par Accrued in Payroll:}{\f1\fs24\ul \tab \tab \tab \tab \tab \par }{\f1\fs24 \par }}"; fwrite($fp, $outputstring); ?> -----Original Message----- From: gamin [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 4:11 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: rtf....I knew it couldn't be this easy "Edward Peloke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok, > > I took a word document, saved it as an rtf then opened the document in a > text editor so that I could see all the rtf code. I then added this code to > my script > $fp=fopen("documents\off.rtf",w); > $outputstring=""; > fwrite($fp, $outputstring); > > For the outputstring, I simply cut and paste the rtf code. I do not get any > errors but when I open the new file I created, there are blank lines between > each line of rtf code and when it is opened in word, it shows all the rtf > code. Is there something else I should do....I knew it couldn't be this > easy. > > I tried escaping all the characters in the string such as /,;,{ but that > didn't work either. Try opening the file in binary mode. Look at fopen() HTH gamin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php