An idiot's guide to making PDFsBy Charles Duckworth. Published: 25th Jun 2006, 02:26:08 | Permalink | Printable
RiScript and Ghostscript put through their pacesAdobe's PDF format is a bit of a Godsend for RISC OS users. We can open PDFs sent from friends and collegues, and now we have several ways of creating them from our desktops to give to others. They can be filled with plans, illustrations, articles and documentation, all using our favourite DTP and artwork packages. Some existing solutions can be fairly tricky to set up, so having battled against several applications, Charles Duckworth now presents his idiot's guide to PDF authoring on RISC OS.
Firstly, I feel well qualified to write this as I know I must be addressing people who know far more about making PDFs than I do. My only real excuse is that if it is possible to get it wrong I will, qualifying for the title 'idiot', so hopefully others won't.
Recently I needed to convert some Impression Publisher files to PDF for a course at Oxford University and tried using GhostScript 7.03 (GS7). The various bits were easy to download onto my PC and transfer to my stand-alone StrongARM RPC with RISC OS 4.02. My Windows XP PC has VirtualA5000 running RISC OS 3.11 with HostFS, and now VirtualRiscPC-SE.
I could not get GS7 to convert any Publisher files with VA5000. There were a number of problems which later turned out to be great sensitivity to a 'broken' font and lack of memory - VA5000 can provide up to 16MB of emulated RAM. There were a number of suggestions from the comp.sys.acorn.apps newsgroup that RaFS might help, but HostFS can handle large numbers of files like RISC OS 4.02. I managed a little better on my RiscPC converting a few files with GS7, but I was rescued by Alan Calder who converted most of my work for me using RiScript.
Over the past few weeks I have downloaded GhostScript 8.53 (GS8), and bought RiScript. Neither the process of downloading them, nor that of setting them up was simple. The details are as follows.
Running on Virtual A5000
This was very easy to download to the PC, and hence to VA5000 as a singe 8MB file, but very difficult to transfer to my stand-alone RiscPC. I eventually achieved this by using Roxio on the PC to burn a RiscPC friendly CD-ROM.
Other files and programs needed:
•PoScript2 (A printer definition file in the Generic folder in this zipfile, from this webpage)
•!PrintPDF 0.32 or !PrintPDF 0.41 or !ps2pdf
•!PDF 1.17 or !Gview
First install SharedUnixLib into !System, as per its instructions. Unpack Ghostscript to a convenient location on your hard disc, and then 'boot' it by making sure the RISC OS filer has seen it, or by double-clicking on the Ghostscript icon.
After unpacking !PrintPDF to your hard disc, run it and it should appear on the icon bar. Install PoScript2 into !Printers version 1.53 or higher by clicking on menu over the !Printers iconbar icon, selecting 'Printer control', and dragging the printer definition file to the window that opens. Release 1.64a of !Printers can be found on the riscos.com website. Next, in the 'Printer control' window, highlight the Postscript printer entry by clicking menu over it and then select 'Connection'. In the settings window that opens, set the output to print to file, click on the menu icon next to the writable icon, and drag the EPS icon from the pop-up save box to !PrintPDF on the iconbar. An EPS file is a document in an intermediary format, namely Postscript, that is used to represent the document in between its conversion to a PDF.
From left to right: The printer control window, from which you can set up the Postscript driver; the menu opened when you click menu over the Postscript entry; the pop-up save box from where you drag the EPS file to the PrintPDF iconbar icon.
A tweak to the 'paper width' from 209.9 to 210.0mm should cure the annoying message window which later pops up. To do this, click menu over the !Printers iconbar icon, select 'Edit paper sizes', and then make sure you're editing 'A4 (Generic PS)'. If you want colour output, click menu over the !Printers iconbar icon, select 'Printer control', then click menu over the Postscript entry in the window that pops up, and select 'Configure' from the menu. This opens up a settings window for the Postscript driver. Once you've set this up, you need not go through this fuss again.
The default memory requirement of !PrintPDF is 8MB, but this can be reduced to 4096KB in the application's 'Choices' menu, otherwise there will not be enough memory to process any files. All non-essential applications can be removed from the iconbar to increase free memory - even !Printers if you then print from the application used.
The Impression DTP document, or any other file you wish to convert, is then dragged to the PoScript2 printer icon and after a short conversion to EPS, the output PDF icon appears in a window. Dragging the PDF icon to the destination directory starts the conversion from EPS to PDF.
Files larger than half a megabyte, usually those containing graphics, are likely to crash VA5000 due to a lack of free memory. This is why I decided to buy Virtual RiscPC-SE.
Running on Virtual A5000
The first thing I did was write to ask the RiScript authors in Holland, via their web site, if RiScript would run on VA5000 - but no reply was forthcoming.
Having decided I would upgrade to VRPC-SE anyway, I paid for RiScript and waited for the email with the download code, and waited, and waited, and emailed again, and waited some more. I eventually got an email stating I had ordered RiScript, but there was no download code.
After some seven days had passed, I got an email plus an attachment containing RiScript from developer Jeroen - about one hour after the drobe.co.uk news desk had emailed the RiScript team to ask what was hold up. I also had one offer from a source in Holland who had waited for one month before he received his software; he offered to send me his version of RiScript until I received my unlock key. I thanked him and said I would wait. Three days later I got my unlock key from Jeroen.
Initially I was very optimistic as the size of the application is smaller than that of the hefty GhostScript port. But, when I unpacked the archive I thought I was seeing things - five files appeared, but after a split second the RiScript and RiTerm icons vanished before my eyes. Highlighting the contents of the directory showed they are still there but invisible, and clicking on one crashes VA5000.
From left to right: The RiScript 5.02 archive; the application is copied to the hard disc; where have my files gone? Highlighting reveals their magic trick.
I then tried this on a desktop PC running Windows XP Pro and VA5000, instead of my laptop PC running XP Home, with exactly the same results.
Running on VRPC-SE
Initially I was not able to get this to work, either by extracting the files from the original GS8 archive, or by copying the working version from my VA5000 partition. I went through the process of looking for the !iSVPatch file and didn't find it in the suggested folder.
There is an assumption on the part of the programmers who use the Acorn newsgroups that the average customer is as well versed in the structure of the software as they are. I buy and download software in order to use it, not tinker with it, and think I have a right to expect it to work without me taking it to bits first and without criticism for not knowing what to do. Otherwise I might just as well change platform, as I suspect many have for exactly this reason.
You must have a filing system that can handle more than 77 files in a directory, ie: RISC OS 4 or greater or something like HostFS or RaFS, before you can use Ghostscript. You also have to watch out for an iSV patch that might be installed, which prevents Ghostscript from running - see the GS8 !Help file for more information. Once you've got all this sorted, then you can follow the above instructions.
Running on a StrongARM RiscPC and RISC OS 4.2
It was difficult to copy GS8 to a stand-alone RiscPC, and I eventually managed by burning archives onto CD-ROM using Roxio software on a PC, before following the instructions above.
GS8 works much better on a StrongARM RPC and exhibits exactly the same characteristics as when running on VA5000, but is able to complete its conversion as there is plenty of RAM available. However, the same problems remain and it is upset by 'broken' fonts, and occasionally fails to convert EPS files that RiScript has no trouble with.
Generally the PDF output works well, but some adjustment of the file type is required on the PC side. For some reason RISC OS PDF files get the suffix ,adf when they are copied to a PC directory which means the file type has to be changed to .pdf before programs such as Adobe Acrobat can recognise them automatically. So setting the filetype as PDF on the RISC OS side ends up as ,adf when copied to the PC side. I would name a file thus 'MyWork/PDF' and transfer to it to the PC side where it becomes 'MyWork.PDF,apf'. I would then use rename to get rid of the ,adf and then it becomes a proper PDF file automatically recognised by Adobe Acrobat etc.
The two great advantages are that GS8 is free and that only two simple drag and drop operations are required.
Running on VRPC-SE
This is what I wanted, a laptop running RISC OS with the ability to reliably convert files to PDF format. RiScript is completely self-contained so no other programs are needed, and installs easily. RiScript often succeeds where GhostScript (GS8) sometimes fails, but it is not all plain sailing.
Once you have got your copy of RiScript, the first thing to do is to add PoScript2 to !Printers and configure output to the EPS file 'Printout' in a convenient location. I use a large RAM disk for this.
Next load !RiScript to the iconbar, but it will load automatically if one double clicks on the 'Printout' icon.
Dragging the EPS file 'Printout' onto the RiScript icon can provoke an 'error' window with the following message inside:
Internal error, no stack for trap handler: Divide by zero, pc = 00064EC4: registers at 0001F10C. Pressing the 'Cancel' button, and then repeating the process usually displays the file correctly in an RiScript window. If there is a way of getting RiScript to process a file dropped onto or printed to PoScript2 automatically, I have not found it yet.
The output options are: save as an EPS file, or export as a Draw file. Dragging the EPS file 'Export' to a filer window creates the final PDF file. As usual this can be renamed before or after the drag and drop. An impressive array of options and permissions are possible for those wishing to restrict the use of their files in the PC world.
Now that I have removed the broken fonts from my system, documents are converted reliably and very quickly to PDF files, whereas GS8 is much slower. I'm not entirely sure what I would do without it.
Viewing PDF files
PDF files can be viewed with !PDF, !Gview and RiScript, or Adobe Acrobat on the PC side. !PDF does not display all the fonts in a PDF document properly but !Gview, RiScript and Adobe Acrobat do. !PDF seems to have one default font and seems unable to display any other fonts. This seems odd to me as Adobe Acrobat is able to reproduce the characters of RISC OS fonts which are somehow coded in the PDF files, but !PDF is not.
To get files to display on the PC side some adjustment of the file type is required on the PC side. Working the other way, files passed to the RISC OS side need to have their filetypes changed to PDF, and removing the /PDF suffix is optional.
On my wish list for GS8 and RiScript: I would like to see the option to keep the input filename when output is it to a different directory, with a safeguard dialogue to prevent overwriting the original file.
I would like one simple drag and drop operation. At present GS8 requires two: one, Print to PoScript2, and two, Save PDF file. RiScript requires three: one, Print to PoScript2, two, Drag the Output file to RiScript (or double click on Output), and three, Save the PDF file.
I would like to see GS8 work as fast as RiScript. I would like to be able to configure RiScript to open with a window size larger than 70 percent - it does not respond to attempts to change the file default size.
However, as I said, I don't know what I'd do without RiScript in general, but at least Ghostscript is free and supports drag'n'drop.
How successful are you with PDFs on RISC OS?
PrintPDF - includes a Readme that also explains how to set everything up
Another way to create PDFs on RISC OS
Previous: USB ethernet driver in development
Next: Who are RISC OS Open Ltd?
DiscussionViewing threaded comments | View comments unthreaded, listed by date | Skip to the end
Please login before posting a comment. Use the form on the right to do so or create a free account.
Search the archives
Today's featured article
RISC OS 6 in pictures
Drobe writer Paul Stewart presents an illustrated round-up of his favourite features new to the RISC OS 6 desktop.
20 comments, latest by sa110 on 23/7/09 10:29PM. Published: 18 Apr 2009
Manchester RISC OS Jaunt
Martin Hansen does Northern dealers
21 comments, latest by Anon on 3/1/04 9:06PM. Published: 21 Dec 2003
News and media:
RISCOS Ltd •
RISC OS Open •
MW Software •
Advantage Six •
CJE Micros •
Liquid Silicon •
Chris Why's Acorn/RISC OS collection •
The Register •
The Inquirer •
Apple Insider •
BBC News •
Sky News •
Google News •