Index


RISC World

PC File Conversion

Brian Pickard

Part 1 Introduction and Text files

Introduction

This series of articles is the result of recent requests from friends with PCs wanting posters, documents, images etc. either modified or designed from scratch. I have a RiscPC and as many of you already know RISC OS applications offer a friendly and more productive platform for producing work. The only snag is most of the world likes (!?) PCs usually running some version of Windows. Therefore files produced by RISC OS cannot usually be imported directly into Windows PC applications and vice versa.

I have found some neat tricks/conversions to get round this problem so in these articles I will try and show how to convert the main types of files (DTP, Spreadsheet, bit images, vector graphics etc) so that any PC user can use. I will also show how to convert the PC equivalents to RISC OS versions so that you can use them.

General Points

Throughout this series I will refer to RISC OS and PC computers. RISC OS refers to any RISC OS computer using any version of RISC OS from 3.1 upwards. PC refers to any Windows based PC (Not Apple or Mac). Windows refers to Windows 3.1 through to WindowsXP.

Plain Text from PC to RISC OS

The first and probably most straight forward type is plain text.

.txt files

Most PC users use Windows Notepad for small text files. These files have a file extension txt. This is the easiest type of text file to deal with. Just load them directly into !Edit. The only alteration, or more accurately tidying up, needed is to take out the &0d codes at the end of each line in !Edit. Click select with the pointer at beginning of the text to ensure the cursor is at the start. Using the Find Text window (press F4 or go through Edit option on Menu). Fill in the window as shown below.

Then click on GO and in the Text found window use the End of file replace button.

Microsoft Word Files (doc files)

Another common application used for text files is Microsoft Word. This can save its files as .txt text files but the most common file type is .doc document files. Since this application is a word processor the file contains the document format information, which includes Font style, point size, page borders etc. A .doc file can also contain bitmap images. A free program called AntiWord can deal with the text basically just extracting it without any of the formatting. The latest version is available to download at www.bulldog.u-net.com/ovationpro/download/antiword.zip.

The text can then be saved as a draw file or as a text file. For a more complete solution including any bitmap images use EasiWriter from Icon Technology. This will allow a word document to be displayed complete with any bitmap images. The font styles may not be completely accurate but the overall view is a good approximation.

Other PC Applications.

A simple rule is: If the PC application can save the text as a file with extension .txt then ask your friend to save it as a text file.

If not then get your friend to install a PostScript printer driver (preferably PostScript language 2 since this deals with colour). There should be a driver on their Windows CD. Once installed set this driver to save the output to file. (Postscript files have .ps extension). This file can then be sent to you and you can deal with it. If the PC user has Adobe software which saves as PDF files then these can also be read using software on the RISC OS platform.

To read PostScript or PDF files you can use RiScript from Cerilica Ltd. This will read them and produce accurate Drawfile, PDF or text file output. I use this extensively and can recommend it. In a future part I will show how to use it to send complex DTP files etc. to PC owners.

Plain text from RISC OS to PC

Use your usual text editor. (I still like !Edit) But at the end of each line place a character &0d (decimal 13). This can be done quite easily using the Find text Window. This time fill it in as shown.

Then in the Text found window use the "End of file replace" button. This will place the required codes in the text ready for the PC application. Save the file on a DOS formatted floppy(or into a DOS Partition on your hard drive for later transfer via the web etc.) with a name in the format name/txt. The / will be read by the PC as a . and so the PC app will be able to recognise it as a text file.

If it is a long text file then you could use the application SparkFS to produce a zip archive file. This will compress the file considerably. Using the zip archive option will make sure the PC owner will be able to decompress/extract the text file, since most Windows users have its equivalent app called WinZip. But check first!

Any PC text or DTP application can usually understand a simple .txt file so nothing should go wrong!

PC Filenames

One thought as struck me at this stage. Perhaps PC filenames are not so well understood. A PC recognises the type of file only from its extension (the three characters after a .) Back in the dim and distant past DOS only allowed a maximum of 12 characters for a file name, including the extension. So I always try and stick to this as I know all PCs should understand this format. When receiving a file from a PC owner the filename might contain many characters and could upset your RISC OS filing system. I use the !Win95FS application which allows PC files from the web to be saved directly into a DOS partition on my harddrive. I then rename them into a convenient form which my RISC OS 3.7 will understand. If Win95FS has not set the file type automatically then it must be set before loading it into any converter/reader. For those of you with later versions of RISC OS (4.01 onwards or VirtualA5000) the file name length should not pose a great problem.

And Finally...

A quick note on my setup. My hardware consists of a StrongARM RiscPC with 64Mbyte memory (2Mbyte VRAM). This is networked to a PC with WindowsXP (mainly used for Web work and emails etc). I can easily move files onto the RiscPC's hard drives from the PC and vice versa for checking file conversions. LanMan98 and Samba take care of that on the RiscPC.

My hard drives have several DOS partitions (max size 2 Gbyte/partition). These are used as shared drives between the PC and RiscPC. This set up gets over the problems with long filenames from the PC. LanMan98 is set up to read several areas of the PC hard drive so that files can be saved directly onto the PC from a RiscPC app.

My printer is connected to the RiscPC and samba allows printing directly from the PC driver which is set as a shared printer. The PC and RiscPC also have PostScript drivers installed both printing to files. The PC driver prints to a RiscPC DOS partition. The RISC OS driver can print to the PC harddrive. Needless to say this setup was rather fiddly to get working but has been well worth it.

Thats it for this part, Next time I will concentrate on graphics files.

If you have any problems or solutions you have found when porting files to and from PCs please drop me an email.

Brian Pickard

 Index