Hi,

Here i have one document(source file) which is in RTF format (contains
background image and size of the document is 3 MB) and reading this
document and

storing as a another RTF document with adding some message thru
programatically.

when i see created new document size is 3MB. but my requirement is to
reduce the document size.

so i changed source RTF file to Doc format and reduced 60 KB. once i
read this document and created as new doc file with message, then it is
creating properly. but i could n't able to open this document..

and saying following message.

"The document name or  path is not valid"



This is my code..



                        <cfscript>

                                    sStart = "<message>";

                                    sEnd = "</message>";

                                    sCRLF = "\par#chr(13)##chr(10)#";

                                    sMessage = "\par \par \par Dear
Doug,\par \par ramesh test\par \par Thank You\par Robert";

                                    nPlace = 1;

                        </cfscript>

<!---       take any image document as a sourcefile..for your example..
--->                                      

            <cffile action="" file="C:\devfolder\inc\sourcefile.doc"
variable="sFileContents">         

                                                

                         <cfloop condition="nPlace gt 0">

                                    <cfset nStartPos=nPlace>

                                    <cfset
nPlace=findNoCase(sStart,sFileContents,(nStartPos+1))>

                        </cfloop>

                        

                        <cfset
nEndPos=findNoCase(sEnd,sFileContents,(nStartPos+1))>

                        <cfset
sFileContents=left(sFileContents,(nStartPos-1))&sMessage&right(sFileCont
ents,(len(sFileContents)-nEndPos-len(sEnd)+1))>

                                                

                        <cffile action=""> file="C:\devfolder\doc\ramesh.doc" output="#sFileContents#"
addnewline="Yes">

            if i read RTF (3mb) document thru this code.. it is reading
well and creating well with 3MB document.. but we need to reduce the
size of the document..



Any ideas will be greatly appreciated..



Thanks

Ramesh

-----Original Message-----
From: Thomas Chiverton [mailto:[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 9:18 AM
To: CF-Talk
Subject: Re: XML -> structure -> WDDX -> JS

On Thursday 04 Mar 2004 09:04 am, Taco Fleur wrote:
> I was under the impression that when I parse XML it is a CF structure?

Only if you call XMLParse()

> Am I wrong, is it not a structure that can be converted to _javascript_
with
> WDDX?

Once you have it as a CF structure, you can turn it into WDDX in the
normal
way.

--
Tom Chiverton
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.***

  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to