Saving a tab formatted field to a file and retaining its formatting

Robert J. Earp rjearp99 at gmail.com
Mon Apr 8 12:24:41 EDT 2019


Thanks for the reply Paul.  Yes, tried that but there are problems.  It saves a .rtf file but when you open that in MSWord (OS X or Windows) the tabs are changed to underscores.  If you open the file in OS X TextEdit it does have tabs but the position/spacing is not retained.  I’ve created a sample/test stack if anybody wants to play ;-)

Our project is supposed to create a formatted file that external to the LC project, gets assembled with other documents/files to make a presentable report.  The other docs/files are .rtf (created in MSWord or Pages or TextEdit) and an .eps file.  The final report will be a .pdf and Acrobat is likely what will get used to manually assemble the final report.

To quote my valued colleague (RogerG) on this problem, and who has spent inordinate hours trying to find a solution, tabs have turned out to be tricky little devils in LC !!

best, Bob... 

> From: Paul Dupuis <paul at researchware.com <mailto:paul at researchware.com>>
> To: use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
> Subject: Re: Saving a tab formatted field to a file and retaining its
> 	formatting
> Message-ID: <ce0de0c4-5daa-22c0-bf46-cfeceb79a2c7 at researchware.com <mailto:ce0de0c4-5daa-22c0-bf46-cfeceb79a2c7 at researchware.com>>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> I take it your have tried:
> 
> put the rtfText of field "X" into URL 
> ("file:"&specialFolderPath("desktop")&slash&"savedfield.rtf")
> 
> And then reading it back to a new field with:
> 
> set the rtfText of field "Y" to URL 
> ("file:"&specialFolderPath("desktop")&slash&"savedfield.rtf")
> 
> and the tab spacing is not preserved?
> 
> 
> 
> On 4/7/2019 7:57 PM, Robert J. Earp via use-livecode wrote:
>> Dear all, we have a field that is formatted nicely with tabs and want to save that as a file, retaining the tab formatting.  The saved file format ideally should be .rtf but we may be able to use other formats such as .pdf
>> 
>> Anybody got any ideas how to do this ?
>> 
>> Thanks in advance for your suggestions.
>> 
>> best, Bob?
>> 
>> Bob Earp - White Rock, BC, Canada



More information about the use-livecode mailing list