Solved

Print Text to File

Posted on 1997-04-23
7
307 Views
Last Modified: 2010-04-25
I am using FileMaker Pro to convert a database from one format to another (Dollars and $ense to Quicken). I want to export the DA$ data to FileMaker, process it, and then import it into Quicken. To do this, I need to output a FileMaker report to a text file as opposed to outputting simply the records since I need the formatting. Unfortunately, FileMaker doesn't support this option.

I figure I can use the LaserWriter driver to "Print to a File", but the resulting file has all the PostScript commands in it. What I need is a utility that interprets this file and converts it to it's text equivalent...or an aplication that can do the equivalent, eg MS Word. Then I can use any text editor to manipulate the data into the format I need.

Although my current need is for FileMaker, the same technique could be used for any other application that does not have a "Print to Text" option.

My question is: are you aware of any such application or is there another technique to accomplish the conversion?

Steve Cunningham
0
Comment
Question by:ir000178
7 Comments
 
LVL 4

Expert Comment

by:rifty
ID: 1539783
Steve:  haven't you answered your own question? If you can generate a postscript file, then you can use Word to read it and convert it to text. Have I missed something here?

Cheers,

Rifty.
0
 

Author Comment

by:ir000178
ID: 1539784
rifty: I may be missing something obvious, but if you open a PostScript file with Word, it reads in the raw data and doesn't interpret it. What you get is all the PostScript commands instead of the output they would generate. For example, use Word to Print to a File the single line "Test File". Then open the resulting PostScript file in Word and you get:

%!PS-Adobe-3.0
%%Title: (Microsoft Word - Document1)
%%Creator: (Microsoft Word: LaserWriter 8 8.4.2)
%%CreationDate: (5:05 AM Thursday, April 24, 1997)
%%For: (S. J. Cunningham)
%%Routing: (mailto:\000ir000178@bigfoot.com)
%%Pages: 1
%%DocumentFonts: Times-Roman
%%DocumentNeededFonts: Times-Roman
....
etc, etc, ad nauseam.

I hope I am being clear.

Steve


0
 

Expert Comment

by:molivier
ID: 1539785
Use FMP's export records command and select the tab-separated-text option, and give it a filename - this will export it to a text-readable file without all the postscript junk. You can then edit it in MS Word - and use the find/replace mechanism in Word to convert tabs selectively to get the formatting you want. If your data has tabs in it, use the export comma separated, or quoted.

0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:ir000178
ID: 1539786
moliver writes "Use FMP's export records command and select the tab-separated-text option"

With all due respects, this does *not* give me what I want, as I mentioned in the text of the original question, viz

 "To do this, I need to output a FileMaker report to a text file AS OPPOSED TO OUTPUTTING SIMPLY THE RECORDS since I need the formatting."

If, for example, a FileMaker Report contains Field Labels, exporting to a tab seperated text file will only export the fields, not the labels. I need both and any other textual information that is part of the report.

In addition, even if this would work, it would only solve the problem for FileMaker (which would nevertheless be welcome) and not the general problem as posed.
0
 

Expert Comment

by:molivier
ID: 1539787
Then the only answer is PostScript. Applications like FMP don't have this concept except for via printing. You could use external tools to process the postscript, e.g., postscript -> PDF -> HTML and maybe then pass it thru a utility to strip tags from HTML. Then you'd have the labels and fields w/o the PS.

0
 

Author Comment

by:ir000178
ID: 1539788
While I appreciate moliver's thoughtful response, I beleive it should be regarded as a comment and not as the answer so that the question will remain open.

One thing I plan to try, for example, is using the PowerPrint driver from GDT Softworks. Since it outputs to Daisy Wheel printers and to Dot Matrix printers in draft mode and spools the output, it must generate an intermediate text file someplace.

I hope some of the experts here can come up with something better.
0
 

Accepted Solution

by:
helpmeplease earned 100 total points
ID: 1539789
trying to print then process the file seems like the long way around the problem. Here's the solution:
create a new calculation field in Filemaker eg:

First Name & "  " & Last Name & "," & Company & "¶"
make sure the result of the calculation is text

This way you preformat the given text the way you want it in Filemaker. Notice how within the quotes you can add punctuation and spaces as required and all items are seperated by the &. I also like to use a return on the end to help in formatting if your going to use a tab in the field but it's not necessary if your not using any tabs to seperate data.

Next export as tab seperated text just the new calculation field you created.

The only formatting you have to do now in a word processer is a find change. Just find all tabs and replace with returns. Now this is where the return in the calculation comes in handy, if there are other tabs in each line just find return+tab and replace with a return.

Oh, by the way the result of the calculation should be text even if some of the fields used in the calculation are numbers.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Are you looking to clear some space on your phone for the latest iOS 8 update? Did you switch to Spotify so you no longer need to keep music native on your phone? Run out of space for taking photos while in the middle of vacation? Sometimes the quic…
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
Users will learn how resize a batch of photos from a single command in Photoshop via Photoshop's Image Processor. Open up an Image you'd like to resize in Adobe Photoshop: Adjust the image size according to your preferences. Image > Adjustments > …
Users will learn how to set proper sequence settings, scale images, paste attributes, add transitions, fades, and music. Open up Final Cut Pro 7 and Create a new Project: Set the Sequence Settings. a) Click File > Easy Setup > Format > Apple ProRe…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now