Release version of GPL Ghostscript 8.60 for classic Amigas

(released: 2nd March 2008, webpage updated: 10th June 2008)



NEW: Click for my x86-native Operating System project webpage



NEWEST DEVELOPMENTS of GS860 CONTENTS
List of new features in GS860 since release of GS8
email: whoosh777 at blueyonder.co.uk :Put GS860 or Amiga in email subject line,
WEBSITE WEBPAGE INDEX

Navigate around this webpage by recursively clicking links starting from this index

My x86 Operating System project

pre-emptive multitasking already (2.july.2007)

Fully 64 bit.

Fully multiprocessor x86 OS.

Fully pre-emptive kernel.

<----- NEW!

dont look so glum!

It does everything everyone wants.

An alternative to Vista, heard of Vista?

Challenging Vista with the AmigaOS philosophy,

AmigaOS pioneered the right way to do many things

but they refuse to challenge Vista or Linux.

Vista is 64 bit multiprocessor x86, wake up before it reaches your desk.

It is the Amiga concepts that matter not the Amiga trademark.

Someone must take those concepts into the future and Amiga WONT.

64 bit Unix and Vista can only be overtaken by a brand new design: voila!

DOWNLOAD VIDEO OF MY OS IN ACTION

There is no warranty for this product you use it entirely at your own risk, if you only write to ram: files and your machine is not connected to other computers then usage will be pretty safe but no guarantee of this is given. A.F.P.L Ghostscript is unconnected with GNU Ghostscript!

PHOTO: novel created from a chapter of documentation with the novel feature. In the foreground is a long arm stapler which is required to staple the middle of the A4 pages. I tend to create 1 novel per chapter. The novel feature correctly deals with page numbers. If there are too many pages you need to subdivide the chapter into sub booklets otherwise the pages become difficult to fold collectively.


A4 pages with 4 pages per side, 2 quid coins showing it is double sided.

The A4 pages are cut in half, and the 2 halves are combined and stapled.

The end product A6 booklet.

Close up showing correctly numbered pages.

PHOTOS: making a titchy A6 booklet from a chapter of a document using the pamphlets feature. I use this feature for documents I am not sure about OR if there isnt much printer paper left. Here are commands for doing this, somedoc.pdf is the document and the booklet is physical pages 97 to 158 (pages 110 and 111 in the last photo are in fact physical pages 128 and 129 for this document):

assign gs: gs860:
makedir somedrive:temp_pamphlet
gs:bin/pamphlet somedoc.pdf 97 158 somedrive:temp_pamphlet/temp
execute ram:script1
execute ram:script2

This creates 3 PS documents in somedrive:temp_pamphlet/ which are temp_0.ps, temp_1.ps and temp_2.ps.

You then print temp_0.ps via gs, this does one side of the pages. Now depending on the printer you print the other sides by printing either temp_1.ps or temp_2.ps. You have to reinsert the pages the right way. You need to reverse the order of these pages and that gives you the pages in the first photo above. You then cut that column of pages in half, put one half above the other and go to the second photo. There is a lot of technique involved, the novels feature tends to be better quality as you dont have to cut the pages.

You need the 22nd May 2007 core and binary archives for this as the system has been enhanced as of 22nd May 2007 (today).

PHOTO: gs:examples/tiger.eps converted to landscape format. This is NOT a graphic rotation but a PS level rotation. The printer will receive a rotated document. The instructions used to generate the image can be seen in the shell in the photo! Note the Workbench backdrop is the previous photo, done via: SYS:prefs/WBPattern and selecting Placement=Workbench, Type=Picture, Picture Name=above picture. The landscape feature is for documents which have been done the wrong way for your printer. Note the aspect in the photo isnt quite right I think that is because 800 x 600 isnt a true aspect: to correctify that you would need to put 2 way resolution args in the "" which counteract the wrong aspect. Actually it is better to correctify when invoking the viewer that way the document remains correct eg -r100x200 is how you do a 2-way resolution.

PHOTO: my whoosh24 PS + PDF viewer viewing gs:examples/tiger.eps on 512MB + 8MB chipmem WinUAE on a 1280 x 800 AMD powered laptop.

PHOTO: example of thumbnails feature created thus:

assign gs: gs860:
gs:lib/pdf2ps.amiga "" gs:examples/tiger.eps ram:tiger.ps
gs:lib/pdf2ps.amiga "" gs:examples/escher.ps ram:escher.ps
gs:lib/pdf2ps.amiga "" gs:examples/annots.pdf ram:annots.ps
c:join ram:tiger.ps ram:escher.ps ram:annots.ps as ram:various.ps
set GSFUNCTION T ; local variables so other shells can do other things.
set GSTHUMBNAIL 3
gs:lib/pdf2ps.amiga "" ram:various.ps ram:thumbnails.ps
unset GSTHUMBNAIL ; remove the settings so other things can be done,
unset GSFUNCTION
gs:bin/gs -sDEVICE=whoosh24 -dBATCH -dNOPAUSE -r300 ram:various.ps

PHOTO of another thumbnails example:



Useful Amiga links ALD www.ann.lu www.amiga.com Martin Blom's Linux-x-Amiga cross compilers
www.amiga.org amiga-news.de AmigaWorld.net x86-AROS boot CD


INTRODUCTION

What is Ghostscript8.54?


          __________________
PS ----->|                  |---> print->|-->Turboprint: max 16777216 colours 24 bit
         |   This port of   |            |-->AmigaOS: max 4096 colours 12 bit
PDF ---->| Ghostscript 8.54 |            |-->inbuilt GS drivers (eg Samsung ML-4500)
         |                  |            |-->ijs (ixemul only)
         |                  |
         |                  |---> view->|-->6 Cyber viewers eg WB truecolor 24 bit
         |                  |           |-->6 AGA viewers eg 262144 colour HAM
         |                  |
         |__________________|---> convert->|-->jpeg
                                           |-->png
                                           |-->fax
                                           |-->bmp
                                           |-->PS
                                           |-->PDF
                                           |-->etc!

thats what this particular port of Ghostscript is!
It also understands current Postscript at all current levels: 1,2,3 as specified by Adobe and current PDF too.
My contribution to the GPL GS860 source consists of:
  1. A fairly major fixing of Florian Zeillers GS510 turboprint device to make it fully compliant with GS8 onwards. To maximise the future of this device I split it up into 3 devices in line with other GS devices such as jpeg and png. My own viewers are also split into 3 devices. Florian's original device only understands Turboprint 7, whereas I have fixed it to understand Turboprint 3,4,5,6,7
  2. Totally writing from scratch brand new viewers for both graphics cards and AGA. For AGA my work allows you to view PS in HAM8 , and for graphics cards to view PS in 24 bit colour eg on depth 24, 16 or 15 screens. I have written 6 different Cyber viewers and 6 different AGA viewers.
  3. Totally written from scratch are 3 methods for printing via AmigaOS printer including 12 bit 4096 colour printing.
  4. I fully debugged the printer driver for the Samsung ML-4500 600dpi b/w laser printer. (my own printer), at £75 its a real bargain. This is present as -sDEVICE=samsung_gdi. This driver isnt yet ported to GS854 though is in GS813.

As a result this port is a major departure from all other ports (there are many). This big departure from all other Amiga GS ports was out of Anecessity as the original AmigaOS specific facilities were malfunctioning quite severely on GS8:
The Turboprint sources used on all other ports exhibited total failure compiled AS-IS, ie they wouldnt print a single pixel. So a lot of work was necessary to rejuvenate Turboprint.
The original AmigaOS specific viewers would crash quite severely, and after several months of battling with GS8 I finally figured out how to do my own viewers. At this point I begun from scratch a whole suite of viewers (12 in total, 6 Cyber, 6 AGA) plus brand new printer code for AmigaOS and Turboprint.

OK!!!



INSTALLATION

A FULL NEW INSTALL IS REQUIRED FOR GS860: YOU CANNOT REUSE GS854, GS850, GS8 or GS813'S INSTALLS


OK!!!



Downloads


Download the following archives
OK!!!



Decompressions



makedir somewhere ; >= 35 meg free

NOW DECOMPRESS all 4 downloaded archives to the same directory, gs860core.lha, gs860fonts.lha, gs860nofpu.lha, icon_scripts.lha.

This now generates everything in somewhere/gs860 which will be gs860:


OK!!!



STARTUP SUMMARY

This now can be done via the icon script startup, eg by double clicking it. The icon script install needs to be done first which just sets the env variable gs860 to the install directory.

; somewhere is the directory all the archives were
; decompressed to in install summary
assign GS860: somewhere/gs860
assign GS: gs860:
assign GS860Fonts: GS860:
assign Ghostscript: GS860: ; if you have Turboprint + use PS:

; From every shell you use gs860 from type eg:
stack 2000000

; a gs860_shell icon could be created with s:gs860_shell-startup
; being the above 3 assigns + stack setting followed by a call
; to the normal s:shell-startup

OK!!!



ASSIGNS:

OK!!!



various assigns are required, the assigns incorporate the version no. that way you can run multiple versions of Ghostscript at the same time.
(I could have replaced these 4 assigns by 1 multiassign but then it would have been confusing for someone without the docs).
You need gs: setup for various scripts to function. gs: doesnt reference the version number which reduces project maintenance.
A 5th assign Ghostscript: is needed if you have Turboprint and want to use PS:

SETTING UP gs: FOR script use

Put in the startup:

assign gs: gs860:

This is needed for the AmigaOS scripts in gs860:lib and gs860:bin to function,

OK!!!




i. GS860:

assign GS860: to the directory containing subdirectories bin doc lib examples etc,
eg.

assign GS860: somewhere/gs860


OK!!!


iii. GS860Fonts:

assign GS860Fonts: thus:
eg.

assign GS860Fonts: GS860:fonts

GS854 onwards require more fonts than GS8,
Multiassigns are fine eg you can do a multiassign over lots of Ghostscript versions fonts.

GS860 can share fonts with GS850, via:
eg.

assign GS860Fonts: GS850fonts:


OK!!!



STACK


a. Choose or open a shell to run Ghostscript from.
b. Make a big stack: eg type in the shell:

stack 2000000

should be adequate. If you dont do this Ghostscript may fail to run and it wont tell you why! If you dont have much memory you may have to go for a smaller stack, eg 150000.
Any shell you run this port from will need a large stacksize set.
OK!!!



USAGE:

Before you can use this Ghostscript 860 port, you need assigns:
GS860: gs: GS860Fonts: and Ghostscript:
and a large stacksize eg 2000000 from the shell you will run it from. Ghostscript 860 needs to be run from a shell, one of the Turboprint testers Michael Merkel has written a GUI frontend to help run GS8 onwards. There is a more primitive icon interface also.
OK!!!







This info and documentation isnt documented anywhere else so make sure to read it in reverse order beginning at no. 1, as it is in reverse chronological order with the most recent improvements at the top, some portability changes which dont affect the user arent mentioned eg some 68k API calls are unsuitable for other AmigaOS variants and have been replaced. Alternatively read it forwards till you reach things you've already read!

75. 6th April 2008: the viewer now begins at the top left of each page, previously it started at the centre.

74. 6th April 2008: the viewer now begins by exactly filling the current window width.

73. 6th April 2008: striking tab makes the viewer exactly fill the current window width.

72. 2nd March 2008: striking 0 makes the viewer remagnify to exactly fit the current window.

71. 2nd March 2008: the viewer remagnifies the first page of a document to exactly fit the window. (unless whooshw is set to 1 in which case the image fits the window width). Further pages are according to 63. below.

70. 2nd March 2008: 68k AmigaOS GPL GS860 is released. GPL has more printer support than AFPL.

69. 2nd March 2008: the viewer is hidden better while the image is being computed.

68. 2nd March 2008: the viewer now gives the page number and document name in the window title.

67. 2nd March 2008: the assigns have been enhanced, the binary just needs 2 assigns now: gs860: and gs860fonts: and users just need one assign gs: this means the documentation and scripts can remain unchanged across versions which will speed up doing new ports.

66. 2nd March 2008: a new icon script for multiselect conversion has been done, not fully betatested but it functions fine on 68k. It allows you to multiselect from a requester which documents to convert.

65. 2nd March 2008: the viewer usage info window now only appears on the first page of the first document viewed in a session. Next document you view there is no info window.

64. 2nd March 2008: error messages as regards memory allocation for various viewer buffers now only appear on the first page of the document.

63. 2nd March 2008: when viewing a multipage document the viewer now opens the next page with a window of the same size, position AND magnification.

62. 2nd March 2008: a new env variable whooshaa makes the viewer anti alias everything by default. set this env variable to 1 for this. This was requested by Tony Pascoal.

61. 2nd March 2008: 4 new env variables controlling the viewer window: whooshxpos controls the x position of the top left, whooshypos controls the y position of the top left. whooshwstart controls the width of the initial viewer window and whooshhstart controls the initial height. These were requested by Joseph Duchatelet.

60. 10th Feb 2008: I created point and click icons for viewing documents, and converting to jpeg or PS.

59. 22nd May 2007: all the scripting mechanisms now are via "execute" and not directly as WinUAE keeps losing the script s flags from script files. This is a workaround enhancement specifically for WinUAE use.

58. 11th May 2007: many inadvertent references to gs850 have been removed from the novels, pamphlets, books and billboards features.

57. 14th Jan 2007: 68k-AmigaOS AFPL Ghostscript 8.54 released,

56. 17th June 2006: Make image transformations permanent by pressing p for p.ermanent.

55. 17th June 2006: Make text more coarse or bright colour text more delicate by pressing w, an upside down m representing the opposite of the function m no 54.

54. 17th June 2006: Make text more delicate by pressing m. I call this "maximum-alias". Is a customisation of the anti-aliasing feature 50.

53. 17th June 2006: New viewer sharpening feature, press s to get a sharper image. Experimental, done out of curiousity, is just a naïve deblurring.

52. 17th June 2006: New viewer blurring feature, press b to get blurring via each pixel replaced by the average of the 3x3 surrounding square.

51. 17th June 2006: Much faster averaged zoom zoom-out, via many tricks. Now reasonably fast even at 400dpi. Requires a lot of memory.

50. 14th June 2006: For the whoosh24 viewer on cybergrafix machines with lots of memory there is now optional anti-aliasing. Just press a to a.nti-alias the image and u to u.ndo this. Only available for the original magnification and zoomed in magnifications. Zoom-out instead uses the colour-averaging instead of anti-aliasing.

49. 14th June 2006: The viewers now contain colour-averaging zoom-out. When computing the image each output pixel is the average of all the contributory input pixels. This makes the image always look "photographic" as you zoom out.

48. 14th June 2006: some shell output is now to a pop up window. eg if you press space or v in the viewer. The v option now also shows the physical page number.

47. 20th Jul 2005: I've customised GS850 to do "BOOKS". Here you input a PDF document doc.pdf and it outputs 2 PS files one containing the odd numbered pages and the other the even numbered ones. You then print the odd pages document. Reinsert the pages and print the even numbered ones for a double sided printout. You can choose between forward and reverse page numbering for the even numbered pages. A blank even numbered page is automatically generated if it is required.

46. 18.jul.2005: I've customised GS850 to do BILLBOARDS, here you input a document and for each page a whole series of pages are output: you can cut these out and they will exactly fit together to form a huge image eg a billboard.

45. 16.jul.2005: I've customised GS850's source so you can now create novels. This prints 2 pages per page side so the double printouts rearrange into a correctly numbered novel.

44. 15.jul.2005: I've customised GS850's source so you can now create pamphlets and create thumbnail documents Pamphlets puts 4 document pages on each side of a physical page, so if cut in 2 horizontally the cut pages recombine into a correctly numbered pamphlet. Thumbnails fits eg 25 pictures 5 x 5 on a page. (or 9 or 16 etc).

43. 14.jul.2005: I've customised GS850's source so you can now view and print pdf and ps documents in landscape

42. 26.jun.2005: for the viewers 5 will now recentre the image, :requested by someone.

41. 26.jun.2005: there is a new env-variable "whooshreverse" which makes scrolling happen in the reverse direction. Set it to 1 to reverse scrolling and 0 the default for normal scrolling.

40. 23.feb.2005: control-C no longer crashes GS850. use control-C from the shell to fully exit the program in the middle of a program.

39. 23.feb.2005: new keyboard commands for the viewers: you can use the calculator keys of your keyboard to move 1/2 a screen in the 8 directions via 1, 2, 3, 4, 6, 7, 8, 9. Also + and - are now alternative ways to zoom-in and zoom-out. You can use the same keys from the main keyboard as well. The letter c will now give you a framecount on the shell.

38. 23.feb.2005: x86-native-aros BitMapScale() rescaling bugs fully resolved now, via my own rewriting of rescaling. My own code now does the rescaling in 68k cybergraphics as well. For AGA the OS is used.

37. 28.jan.2005.730pm: Samsung driver ported to GS850. So as of today GS850 fully supercedes GS813 here.

36. 27.jan.2005: AFPL Ghostscript 8.50 released for 68k-AmigaOS and x86-AROS.

35. 8.nov.2004.midnight: Morphos noixemul port attempt made available, use at your own risk. Use the nofpu 68020 port if you encounter any problems.

34. 1.sep.2004: Cary Driscoll has sent me a new version of his Final Writer to PDF script.

33. 10.jul.2004: feedback based improvements to PS: and Turboprint instructions,

32. 9.jun.2004: x86-AROS port of GS813 complete and available for download.

31. 19.may.2004: linux-hosted gcc-3.3.1 for x86-AROS ported to 68k-host, enables port of GS813 to x86-AROS mentioned on 9th Jun 2004.

30. 18.apr.2004: feedback that only the nofpu 68k port of GS813 should be used on Morphos. (both fpu and nofpu 68k versions of GS8 were fine on Morphos)

29. 28.mar.2004: Cary Driscoll sent me a Final Writer to PDF script

28. 24.mar.2004.3pm: Have created 2 AmigaOS shell scripts for converting ps to pdf via gs: GS813:lib/ps2pdf.amiga and GS813:lib/ps2pdf.full.amiga, Read these 2 scripts for usage info. Obtain these scripts by decompressing as explained in no.27 below. Further similar scripts will be done eventually,

27. [removed this entry as its no longer relevant.]

26. 22.mar.2004.4pm: UPGRADED GS8 TO GS813! involved a lot of tidying up and reorganising the internal code. Future versions of GS should happen much faster, though I wont try and track each and every version.

25. ??.Mar.2004: control-C now results in the program exiting with return value 20 instead of 100 as it was previously,

24. 5.mar.2004.midday: various fine tunings of zoom + scroll acceleration:

i. screen flashes when you reach the upper and lower bounds,

ii. flit steps are finest possible.

iii. delays between flit steps removed,

iv. upper and lower size filters brought in wherever relevant to prevent floating point overflow,

23. 4.mar.2004.11am: 2 new env variables to control zoom step and zoom acceleration step, whooshzoomstep and whooshzoomsubstep eg:

setenv whooshzoomstep 1.05
setenv whooshzoomsubstep 1.01

:this would zoom you in by a factor of 1.05 each time you press up-arrow, and if you kept left-shift down and typed up arrow 3 times this zoom in factor would be increased to 1.05 * 1.01 * 1.01 * 1.01 ie 1.081816,

22. 4.mar.2004.11am: If you type 'v' from the viewer it now shows you what the current keyboard scroll speed is.

21. 4.mar.2004.11am: zoom + scroll acceleration mechanism introduced in no. 20 below now lets you "see" what the new zoom or scroll step is by flitting the image back and forth.

20. 1.mar.2004.345pm: you can speed up or slow down keyboard-scroll and zoom now:

Left-Shift+Up-Arrow	=> speed up zoom by a factor of 1.005 per key press
Left-Shift+Down-Arrow	=> slow down zoom by factor of 1.005
Left-Shift+Right-Arrow	=> speed up keyboard scroll by 1 pixel per key press
Left-Shift+Left-Arrow	=> slow down keyboard scroll by 1 pixel per key press

19. 1.mar.2004: due to repeated requests you can now scroll in all 4 directions via the arrow keys. The new default mechanism for this is to type control-arrowkey. However if you wish you can customise this eg to CAPSLOCK-arrowkey, ie CAPSLOCK will toggle between zoom and scroll for the up down keys. This is how you customise it, you use new env variable whooshqualifier, and set to any of the following values, default==3==CONTROL

Right SHIFT		1
CAPSLOCK		2
CONTROL			3
Left ALT		4
Right ALT		5
Left Amiga		6
Right Amiga		7

So eg

setenv whooshqualifier 2
will make CAPSLOCK toggle the up-down arrowkey behaviour between zoom and scroll. CAPSLOCK is not the default as toggle mechanisms can be confusing. Defaults need to be the safest possible options.

Technically speaking whooshqualifier can be set to any of the IEQUALIFIERB_#? values in include file devices/inputevent.h provided it makes sense EXCEPT left-shift as this already has a meaning. Really the above list looks like the useful values.

18. 1.mar.2004: Greatly improved keyboard scrolling. I noticed that the original scrolling caused a mouse sleep for every scroll step. (putting in the mouse sleep feature (no.11 below) is yielding dividends). The keyboard scrolling is now 10 times faster and much smoother with only very occasional mouse sleeps. Unset the whoosharrowspeed env variable as the new default of 5 seems sufficiently good.

17. 1.mar.2004: I found a subtle viewer bug, the keyboard commands were all case sensitive, ie uppercase commands were ignored eg via CAPSLOCK. This has been fixed: keyboard commands are now case insensitive.

16. 1.mar.2004: Sometimes requests come for less Screen Beeps, you can switch off all screen beeps except one on AGA via env variable whooshbeep. AGA has a bug where the lower 4 bits of the blue component are ignored. The fix for this bug requires a screen beep for the new correct colours to "happen". To switch off screen beeps:

setenv whooshbeep 0

15. 1.mar.2004: people keep asking for this, so here it is:

c:version gs
now produces a meaningful result. The output of the command is non standard as I dont use or like version numbers (too arbitrary and meaningless).

14. 1.mar.2004: ESC key will now quit the viewer, this was requested very recently,

13. 1.mar.2004: viewer shell output can now be fully switched off via env variable whooshquiet, BEWARE: this will currently switch off all error messaging. Switch off viewer shell output thus:

setenv whooshquiet 1

:people keep asking for this, so I have done it. Note that shell output will also tell you all env variables values used the first time they are read in.

12. 22.jan.2004: The timeout for the viewer to discard scrolling events has been changed, this results in much nicer scrolling behaviour. The timeout used to be 0.1 seconds, now it is 0.33 seconds. A new env variable has been introduced to control this timeout: whoosh100 this measures in 1/100 seconds the timeout. If this number is either too large or too small scrolling becomes less pleasant. Too large causes timelag, too small causes jumpiness.

11. 22.jan.2004: The viewer mouse pointer now sleeps during rescaling, this way you know that scrolling has halted briefly due to AGA thinking! This is relevant for when you scroll around after zooming in. You will realise eg on AGA that rescaling is a relatively slow process.

10. 22.jan.2004: Some irrelevant intuition events have been removed, removing some annoying viewer timelags.

9. Turboprint specific gs8 cli args have been reconnected, click here for further information

8. colour + b/w viewers now available for depth-8 WBs on graphics cards, also available now are depth-8 custom screen viewers for graphics cards.

7. ironical feature: the viewers now uses SIMPLE_REFRESH windows for the viewers instead of SMART_REFRESH. SIMPLE_REFRESH is smart! This results in faster and better behaved viewer graphics. It should also require less chip ram, all window refresh is now done by the viewer code. The problem with SMART_REFRESH is that there are 2 agents of refresh, namely the program and the OS. This makes it inefficient also it requires extra layers+regions chip ram. The SIMPLE_REFRESH viewers now feel much nicer.

6. The env variable whooshw has now been extended to cover all custom screen viewers. Previously it only applied to the WB viewers.

set whooshw 1 

:this command makes the viewer recompute the image resolution so it exactly fills the screen width taking into account window border sizes. I could do a height version as well but not sure if this has any value. Note that the underlying image will exactly fit the width, however the viewer window itself may be less than full width because of env variables whooshviewx, whooshviewy, whooshxsafe, whooshysafe. So eg on AGA super-hires the viewer window width would only be 800 pixels by default.

5. There is now an option for non-interleaved BitMaps, such BitMaps are better for low chip ram situations on AGA setups. This feature is probably irrelevant for Graphics cards as they dont use bitplanes. The disadvantage of non-interleaved is that when the viewer image is changing it doesnt look clean. As always there is a tradeoff, if there wasnt a tradeoff then there would be no need for an option!

Anyway to use non-interleaved BitMaps you do:

set whooshinterleave 0 ; => non interleaved BitMaps

Note that WB windows are always interleaved so the env variable has no effect for the WB viewers.

4. For AmigaOS printing if BitMap allocation fails eg if env variable overhead is too high, then instead of giving up the code now repeatedly halves the overhead till it either succeeds or hits 0!. So if you tried 100meg overhead it would try in turn: 100meg, 50meg, 25meg, 12.5meg etc till it reaches a 1 line bitmap, if the 1 line bitmap fails it gives up.

3. New env variables have been introduced to restrict the viewer window size, this has the effect of freeing up chip memory to be available for the scroll space. This will mainly be of use to people with low chip memory situations on AGA.

The env variables and example usage:

set whooshviewx 100 ; will restrict viewer window 
                    ; to width 100 pixels
set whooshviewy 200 ; will restrict viewer window 
                    ; to height 200 pixels

2. There was a slight bug in the original release version with regards to env variable whooshscreen, if set as a local variable it was ignored. This has now been fixed!

So in the original release you had to type

setenv whooshscreen magic_number

Now you can do what was actually intended namely:

set whooshscreen magic_number 

1. Other minor changes: default res is now 74dpi x 74dpi, this is the maximum integer res that fits completely in a default width 640 window for typical pages.

:the program needs "safe" default values so first time users get best program behaviour.

Cyber 1 bit custom screens erroneously had "AGA" in the title, this has been fixed!



HELP FUNCTION



gs:bin/gs -h

This will list out a lot of info, eg important switches, and a list of all current devices. With GS854 onwards the device list is now alphabetically arranged.

OK!!!




GRAPHICS CARD VIEWERS USAGE


OK!!!




24 BIT RGB CYBER WB VIEWER



set print 0 ; printer off
set window 1 ; viewer on
set whooshsuper 1 ; WB on
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/annots.pdf

How to use the viewer!


The GS> prompt


OK!!!




24 BIT RGB CYBER CUSTOM SCREEN VIEWER



set print 0 ; printer off
set window 1 ; viewer on
set whooshsuper 0 ; WB off, custom view on
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/annots.pdf

Select a screen of depth 15, 16 or 24. The choice of depth is up to you, higher depth == more colours but probably slower.

How to use the viewer!

The GS> prompt


OK!!!




256 SHADES OF GRAY CYBER WB VIEWER



set print 0 ; printer off
set window 1 ; viewer on
set whooshsuper 1 ; WB on
gs:bin/gs -sDEVICE=whoosh8 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh8 -dNOPAUSE gs:examples/annots.pdf

With GS8 you have to use -sDEVICE=whooshg, whereas with GS854 onwards you can use either -sDEVICE=whoosh8 or -sDEVICE=whooshg


How to use the viewer!


The GS> prompt


OK!!!




256 SHADES OF GRAY CYBER CUSTOM SCREEN VIEWER



set print 0 ; printer off
set window 1 ; viewer on
set whooshsuper 0 ; WB off, custom viewer on
gs:bin/gs -sDEVICE=whoosh8 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh8 -dNOPAUSE gs:examples/annots.pdf

NOTE: With GS8 you have to use -sDEVICE=whooshg, whereas with GS854 onwards you can use either -sDEVICE=whoosh8 or -sDEVICE=whooshg

Fastest viewing is via a depth 8 Cyber screen, these appear to be functioning correctly now. If they fail then try out depths 15 , 16 or 24.


How to use the viewer!


The GS> prompt


OK!!!




RAPID RENDER 1 BIT B/W CYBER WB VIEWER



set print 0 ; printer off
set window 1 ; viewer on
set whooshsuper 1 ; WB on
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/annots.pdf


How to use the viewer!


The GS> prompt


OK!!!




RAPID RENDER 1 BIT B/W CYBER CUSTOM SCREEN VIEWER



set print 0 ; printer off
set window 1 ; viewer on
set whooshsuper 0 ; WB off, custom view on
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/annots.pdf

Fastest viewing is via a depth 8 Cyber screen, these appear to be functioning correctly now. If they fail then try out depths 15 , 16 or 24.


How to use the viewer!


The GS> prompt


OK!!!




CLASSIC A1200 + A4000 AGA VIEWER USAGE


OK!!!




HAM8 CUSTOM SCREEN AGA VIEWER


For AGA this is actually the default viewer so you can just type:

gs:bin/gs gs:examples/tiger.eps
gs:bin/gs gs:examples/annots.pdf

However you may have various env variables set from trying out other viewer options so the full way to use this viewer is:

set print 0 ; printer off
set window 1 ; window on
set whooshsuper 0 ; wb off == custom on,
set whoosh216 0 ; 216 colour off == HAM8 on
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/annots.pdf


How to use the viewer!

The GS> prompt


Note that zoom in respects the HAM8 structure but zoom out doesnt. Thus naive zoom in is fine, but if you zoom out beyond the initial resolution the image is imperfect.


OK!!!




216 COLOUR CUSTOM SCREEN AGA VIEWER



set print 0 ; printer off
set window 1 ; window on
set whooshsuper 0 ; wb off == custom on,
set whoosh216 1 ; 216 colour on == HAM8 off
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/annots.pdf


How to use the viewer!

The GS> prompt

This viewer is good for simple colour docs as well as for colour text: HAM8 isnt so good at sharp colour changes.
If you want realistic colours use the HAM8 viewer.


OK!!!




256 SHADES OF GRAY CUSTOM SCREEN AGA VIEWER



set print 0 ; printer off
set window 1 ; window on
set whooshsuper 0 ; wb off == custom on,
gs:bin/gs -sDEVICE=whoosh8 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh8 -dNOPAUSE gs:examples/annots.pdf

NOTE: With GS8 you have to use -sDEVICE=whooshg, whereas with GS854 onwards you can use either -sDEVICE=whoosh8 or -sDEVICE=whooshg


How to use the viewer!

The GS> prompt

For AGA 256 shades of gray viewing is only available thus on a custom screen.
This viewer has the advantage of photorealism (albeit in gray) and sharp "colour" changes. Compare with 216 colour viewer which gives sharp colour changes but no photorealism, and the HAM8 viewer: photorealism, pseudo-18-bit colour but no sharp colour changes.
:You can't win!


OK!!!




RAPID RENDER RAPID VIEW 1 bit b/w CUSTOM SCREEN AGA VIEWER



set print 0 ; printer off
set window 1 ; window on
set whooshsuper 0 ; wb off == custom on,
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/annots.pdf


How to use the viewer!

The GS> prompt

This is the fastest render method and fastest viewing.
It is the only viewer option that uses 1 bit plane, this makes it dazzlingly fast. The dithering is not wonderful though!
If you need to browse through a 200 page pdf file for info, use this method.


OK!!!




COLOUR WB AGA WINDOW VIEWER



set print 0 ; printer off
set window 1 ; window on
set whooshsuper 1 ; wb on == custom off,
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/annots.pdf


How to use the viewer!

The GS> prompt

This viewer allows you to view your doc on the WB screen which can be convenient. The colours are allocated via the OS, they arent perfect, the higher your WB depth the better the colours. I think the colours are acceptible on a 16 colour WB, even an 8 colour WB is alright actually. If you want perfect colours use the HAM8 custom screen viewer


OK!!!




RAPID RENDER 1 BIT B/W WB AGA WINDOW VIEWER



set print 0 ; printer off
set window 1 ; window on
set whooshsuper 1 ; wb on == custom off,
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/annots.pdf


How to use the viewer!

The GS> prompt


OK!!!




THE GS> PROMPT


To exit from the prompt type quit eg:

GS> quit

The GS> prompt is a Postscript interpreter prompt, you can enter any Postscript language statements which then accumulate. You can also print or view another doc file by same method as preceding doc file thus, eg you wish to process gs:examples/tiger.eps you then type:


GS> (gs:examples/tiger.eps)run

OK!!!




HOW TO USE THE VIEWER


OK!!!




NORMAL VIEWER SCROLL


Click on a point on the image and drag the mouse, the image should move with the mouse. That's it!


OK!!!




AUTOMATIC VIEWER SCROLL

Try normal scroll first. Now click + release right mouse button. The image should start scrolling automatically, it uses the most recent nonzero normal-scroll velocity. When it hits the image boundary it will bounce off, ad infinitum.
While automatic scrolling is happening, try doing normal scroll by dragging the left mouse button, on releasing left mouse button automatic scroll now continues in the direction you pushed the image.
Click right mouse button again to switch off the facility.
Right mouse button toggles on and off the automatic scroll facility.

OK!!!




NAIVE VIEWER ZOOM


This facility only becomes available after the initial render is complete: wait till the screen flashes and then you can use it.
Naive zoom is based on zooming into and out-of an unchanged underlying bitmap. So as you zoom in the pixels become bigger!
It is nonetheless quite useful and also forms the basis of the hacked proper zoom. As the underlying bitmap is unchanged it is quite fast and seems quite useful. Although the underlying bitmap is unchanged you have to do quite a bit of zooming in before you notice the pixels.
The pixels anyway are quite interesting to study!
Naive zoom is done via the keyboard, press up arrow and you zoom in. Keep the key depressed and you zoom in continuously. On key release possibly 2 extra zoom ins occur. It is better to keep the key depressed continuously instead of pressing it repeatedly, the reason is that if you press the key repeatedly every single key press is queued up by the OS and acted upon. OTOH if you press the arrow key continuously the OS only queues up approx. 2 key events.

key meaning
Up arrow rapid naive zoom in
Down arrow rapid naive zoom out
left arrow (<--) scroll left
right arrow (-->) scroll right
Left Mouse button Direct scroll image by click and drag
Right Mouse button Toggle on or off automatic scroll
h h.alve the image size
d d.ouble the image size
r r.eset to original resolution
v v.alue of current zoom is echoed to the shell
q or ESC or CLOSEWINDOW q.uit, same effect as clicking closewindow


If you type an unrecognized key such as y then the shell will echo a list of currently recognized keys + what they mean.
You can zoom out till the image vanishes into 1 pixel, and you can zoom in until 1 pixel fills the screen.
The interpretation of the 4 arrow keys means that if you have a wheel mouse you can move left + right + into + out-of the image. I havent got a wheel mouse myself so I have never tried this. Apparently the wheel + mouse movements are translated into arrow events.
To speed up naive zoom, shrink the viewer window. If the window is half the size then the viewer will become 4 times as fast.
If using a custom screen viewer then you can also speed things up by selecting a lower resolution screen from the screen requester.
:eg lo-res should be 8 times as fast imaging as super-hi-res-laced.

OK!!!




HACKED PROPER ZOOM VIEWING


If you use naive zoom the pixels grow bigger as you zoom in. What you may want is to now have the image rerendered at a new higher resolution so you get same image but with tiny pixels. This is how you do it, its a hack-mechanism as I havent found a way to make GS8 do this directly:
On each page of a doc, using naive zoom select a view you like and press z. z==z.oom.
Do this on each page if it is a multipage doc. Now exit GS8 completely, ie at the GS> prompt type quit

GS> quit

Now rerun GS860 from scratch with the identical command line you used before, on each page this time you will get the view you selected first time round with the new resolution.
This is done via global env variables zoom#?. On this second zoomed in viewing you can repeat the procedure by typing z on each page at a selected view.
Each time the zoom#? env variables are read in and immediately deleted after being read in. If you wish to reuse them several times then make a backup of them via:

copy env:zoom#? somewhere


OK!!!




VIEWER USAGE TIPS


For faster viewer graphics use a custom screen viewer with a lower resolution, eg Hires will be 4 times as fast as super-hi-res-laced.
Also to speed up the graphics shrink the viewer window, if you halve the window size then graphics should speed up by a factor of 4.
So if you follow both of the above tips you get a stunning speed up of 16!
On AGA if you use 1 bit b/w custom screen viewer that gives you a further speed up of 8, so combined with the above 2 tips you get a speed up of 128!!
:simple maths has impressive consequences with this program!
For graphics cards the 1 bit viewer can be done at depth 8 which gives you a further factor of 3 ie total speed up of 48,

OK!!!




INBUILT GHOSTSCRIPT PRINTER DRIVERS


Ghostscript inbuilt printer drivers dont know about AmigaOS, so to print directly via them you have to use a trick, example: epson driver, type all on one line:

gs:bin/gs -sDEVICE=epson -dNOPAUSE -sOutputFile=par: tiger.eps

A different method which I prefer is to use printer binaries, type all on one line:

gs:bin/gs -sDEVICE=epson -dNOPAUSE -sOutputFile=ram:annots%d annots.pdf

Producing files ram:annots1, ram:annots2, etc, to print page 4:

copy ram:annots4 par:

OK!!!




TURBOPRINT USAGE


OK!!!




TURBOPREFS COMMAND LINE


The new command line to enter into turboprefs is:

gs:bin/gs -sDEVICE=tp24 -dBATCH -dNOPAUSE -q

You may of course put eg -sDEVICE=tp1 if you want to do fast low colour printouts,

SETTING UP PS: FOR TURBOPRINT USE


22feb2004: C. Driscoll has explained to me via email how to set up PS: for GS860 and what is going on,

MORPHOS users: CLICK for Turboprint GS510 things: http://www.irseesoft.de/ghostscript (:24.mar.2004.1050pm)

Morphos users: CLICK for extra magic required to make PS: function. :apparently "just drop the gs-handler in L: and place the PS mount file in devs:dosdrivers."

:Note that Turbo GS510 only understands Turboprint 7, whereas in my ports the Turboprint devices understand Turboprint 3,4,5,6,7: required careful surgery, I believe in backward and forward and sideways compatibility! If I didnt you wouldnt be able to use this port eg on Morphos or OS4 or on early A1200's,

Setting up PS: consists of 3 parts: handler + mountlist + assign:

1. The handler: you need to recycle the GS510/l/gs-handler thus:

makedir GS860:bin/l
copy GS510/l/gs-handler GS860:bin/l ; IYSWIM!

2. The mountlist: recycle the GS510 DEVS: mount file, to DEVS: not sure what the mountlist is called,

3. The assign: C. Driscoll tells me that Ghostscript: needs to be assigned in such a way that you get Ghostscript:l/gs-handler, thus you need eg:

assign Ghostscript: GS860:bin  ; startup each time you boot,

The Ghostscript: assign is only relevant to PS:, its not a GS860 thing but a PS: thing. C. Driscoll also says you can if you wish edit the mountlist to say L:gs-handler, however that gs-handler has Ghostscript: and Ghostscript:GS embedded in the code, so even if you edit the mountlist you will continue getting the Ghostscript: requester.

So the path of least resistance seems to be to leave the mountlist unchanged and follow steps 1, 2 and 3!

OK!!!




24 BIT RGB TURBOPRINTING



gs:bin/gs -sDEVICE=tp24 -dBATCH -dNOPAUSE -dFirstPage=2 -dLastPage=4 -q annots.pdf
gs:bin/gs -sDEVICE=tp24 -dBATCH -dNOPAUSE -q gs:examples/tiger.eps

:all on one line, the -dFirstPage and -dLastPage tricks are only available for pdf docs, not for ps docs. annots.pdf is in GS860:examples/

The GS> prompt


OK!!!




256 SHADES OF GRAY TURBOPRINTING



gs:bin/gs -sDEVICE=tp8 -dBATCH -dNOPAUSE -dFirstPage=2 -dLastPage=4 -q annots.pdf
gs:bin/gs -sDEVICE=tp8 -dBATCH -dNOPAUSE -q gs:examples/tiger.eps

Please note: for GS8 you have to use -sDEVICE=tp8g, with GS854 you can use either -sDEVICE=tp8 or -sDEVICE=tp8g

With GS854 the name has been changed to be easier to remember.

:all on one line, the -dFirstPage and -dLastPage tricks are only available for pdf docs, not for ps docs. annots.pdf is in GS860:examples/

The GS> prompt


OK!!!




RAPID 1 BIT B/W TURBOPRINTING



gs:bin/gs -sDEVICE=tp1 -dBATCH -dNOPAUSE -dFirstPage=2 -dLastPage=4 -q annots.pdf
gs:bin/gs -sDEVICE=tp1 -dBATCH -dNOPAUSE -q gs:examples/tiger.eps

:all on one line, the -dFirstPage and -dLastPage tricks are only available for pdf docs, not for ps docs. annots.pdf is in GS860:examples/
This produces the fastest render, its good for text only documents. Its also good if the document only has solid regions of black on a white background (no grays or colours).
If the document has lots of delicate colours or gray then use tp24 or tp8

The GS> prompt


OK!!!




AmigaOS point and click icons

Download icon_scripts.lha, this presents icons for a point and click approach.

The following info is also in the archive.

make sure that your startup has:

assign gs: gs860:

The interface is via the visible icons only, the other scripts are auxiliary and not to be directly called.

double click the "view" icon and you get a requester for what document to view, that is then viewed.

double click convert_to_jpg and you input a ps or pdf document which is then converted to jpg in ram: eg if you select gs:examples/annots.pdf you get ram:annots1.jpg, ram:annots2.jpg ...

double click convert_to_pdf and you select a document to convert to a pdf in ram:

multi_convert_to_pdf allows you to multiselect from the requester which documents to convert. After conversion the documents are moved to the selected completion directory. DONT try this on gs:examples as it will move the examples out! This hasnt been fully tested, so please make a backup or test from ram.

you can customise these scripts to do other things.

they function via c:iconx it is possible you may need c:xicon instead for some systems.

OK!!!




AMIGAOS PRINTER USAGE


OK!!!




12 BIT 4096 COLOUR AMIGAOS PRINTING



set print 1 ; printer on
set window 0 ; viewer off
set overhead 4000000 ; set a total print memory overhead
;of approx 4meg, this is split into 2
;equal sized double buffers,
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh24 -dNOPAUSE gs:examples/annots.pdf

Hopefully it prints.
It prints on my Star-LC10 via epson emulation only in b/w, I have so far not found anyone with a directly AmigaOS supported colour printer to test this. So maybe it will fail!
The GS> prompt


OK!!!




256 SHADES OF GRAY AMIGAOS PRINTING



set print 1 ; printer on
set window 0 ; viewer off
set overhead 4000000 ; set a total print memory overhead
;of approx 4meg, this is split into 2
;equal sized double buffers,
gs:bin/gs -sDEVICE=whoosh8 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh8 -dNOPAUSE gs:examples/annots.pdf

NOTE: With GS8 you have to use -sDEVICE=whooshg, whereas with GS854 onwards you can use either -sDEVICE=whoosh8 or -sDEVICE=whooshg

The GS> prompt


OK!!!




RAPID RENDER 1 BIT B/W COLOUR AMIGAOS PRINTING



set print 1 ; printer on
set window 0 ; viewer off
set overhead 4000000 ; set a total print memory overhead
;of approx 4meg, this is split into 2
;equal sized double buffers,
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/tiger.eps
gs:bin/gs -sDEVICE=whoosh1 -dNOPAUSE gs:examples/annots.pdf

The GS> prompt


OK!!!




CONVERT PS AND PDF TO JPEG



gs:bin/gs -sDEVICE=jpeg -r150 -dJPEGQ=100 -dNOPAUSE -dBATCH -sOutputFile=ram:annots%d.jpeg annots.pdf

:all on one line would convert annots.pdf to jpeg files ram:annots1.jpeg, ram:annots2.jpeg etc at 150dpi, 1 jpeg for each page.

It would do this at 100% quality because of the -dJPEGQ=100 switch. If you want 10% quality you use -dJPEGQ=10 instead etc.

NOTE that 100% quality is NOT the same as lossless jpeg as the latter is commercial and discouraged by the opensource community, instead if you want lossless images use -sDEVICE=png which is a free open standard (I hope!).
-sDEVICE=jpeg is useful for interfacing with web-browsers as jpegs can be viewed via browsers.
So you can make a PS page available for a browser by converting it to jpeg via -sDEVICE=jpeg and then linking to this in the html.

General info about the command line: all Ghostscript arguments such as -dJPEGQ are CASE SENSITIVE ie -dJPEGQ=20 is GOOD, but -djpegq=20 is WRONG and -DJPEGQ=20 is WRONG. Also the order of the args MATTERS, Ghostscript processes the arguments left to right, some orderings are good and some are not! The above presentation of arguments is correct and other presentations are correct. This is different from a lot of Unix programs where arguments can be presented in any order.

I find its best to put the device as the first arg and right at the end to put the output file followed by the input files:

gs -sDEVICE=????? ...... -sOutputFile=???? infile1 infile2 infile3

From left to right the args of the jpeg example are:

1. first gs:bin/gs is the path to the Ghostscript binary, on *nix probably just gs ok

2. -sDEVICE=jpeg is the jpeg device ie convert documents to jpeg, for list of devices: gs:bin/gs -h ok

3. -r150 is the resolution in dpi (dots per inch, ie pixels per 2.54cm, computer monitor is approx -r100), ok

4. -dJPEGQ=100 is a device specific argument specific to -sDEVICE=jpeg explained above, ok

5. -dNOPAUSE means Ghostscript shouldnt pause annoyingly between pages, ALWAYS do this ok

6. -dBATCH means Ghostscript should exit on completion, ALWAYS do this ok

7. -sOutputFile=some_path/somefile%d means the output file, ok

8. %d means create an output file for each page substituting %d by the pagenumber. ok

9. And lastly are presented a list of PS or PDF files to convert. ok

Note that this website is about the 68k-AmigaOS Ghostscript binary available from this webpage, however various info will apply to all Ghostscripts. Many things are only applicable to this specific version of Ghostscript, namely things I coded myself. Today most people use 68k-AmigaOS in emulated form, eg for PC's there is a commercial product called "Amiga Forever" which is an Amiga emulator for PCs. Via that people with PCs can use this port. There is also an excellent free Amiga Emulator for PCs called WinUAE but you need to supply the ROM image and system disk images. People also can use the binary here via the AmigaOne (A1) and Morphos on Pegasos which are both PPC versions of AmigaOS with integrated 68k-AmigaOS emulators. There is also the AROS reimplementation of AmigaOS for PCs, I dont know if they have a 68k-emulator yet, I think that is one of their projects. I did a version of the program for AROS some years ago but many features have been implemented since then and I havent done any further builds for AROS.
2006.8.1: someone has pointed out that the original command I gave created a 72dpi jpeg which was a bit low res. So I've modified the shell command above to give the res, here at -r150, you can use any other number eg -r100 or -r300 etc.

OK!!!




USE GHOSTSCRIPT AS A TYPEWRITER!

topic originally from Thursday 8th May 2003 1115pm

For typing with GS you need some language layer otherwise its a real pain, thus use my own language layer: type.ps.

The problem is that GS uses a coordinate system with the wrong origin + wrong axes directions wrong measure etc. Thus to make it user friendly use the above file.

All commands beginning with Upper case initial letter are my own commands, so if you look inside the above file anything beginning with lower case is an inbuilt PS command eg show is the inbuilt PS command for printing text.

Begin by calling gs as usual with the above file as input, eg

gs -sDEVICE=whoosh24 -dNOPAUSE -r30 type.ps

This will take you immediately to the GS> prompt.

Now try this:

GS> (Hello world!)show
GS> (this is a test)show
GS> Newline
GS> 255 255 0 Square
GS> (see a yellow square?)show
GS> 0 255 255 Square 
GS> Newline (:cyan square)show
GS> Newline
GS> /NimbusSanL-Regu Font
GS> (:new font being set)show
GS> 5 Fontsize /NimbusSanL-Regu Font
GS> Newline
GS> (Big 5cm!)show
GS> Newline
GS> 1 Fontsize /NimbusSanL-Regu Font
GS> (smaller font!, see gs8data:fontmap.gs)show
GS> Newline
GS> (for all available fonts)show
GS> Print

You can do this also for any GS device, whenever you enter Print it will print the current stuff to the printer or other device.

gs -sDEVICE=anydevice -dNOPAUSE type.ps

This can also be done from a pre-made file, eg:

gs_000 -sDEVICE=somedevice type.ps

Then at the GS> prompt type:

GS> (typetest) run Where the file typetest contains the above commands, this makes life a lot easier to debug the PS file. You can also add your own language layer to extend type.ps.

You can do all this directly with PS but its a lot of work as eg the units of measurement are 1/72 inch,

Also PS does rgb colours with floating point values between 0 and 1 for each component. type.ps retargets this to the traditional computer 0-255 values!

type.ps keeps track of vertical position on the page, the Newline procedure resets the position to the start of the next line.

By using my type.ps layer file, you have user friendly usage of GS for text using all GS fonts in gs8data:fontmap.gs and any other ps fonts.

Thus you can write a letter with commercial quality printout just armed with GS and type.ps

Handwritten Postscript generally requires debugging eg one line may collide with another or run off the edge. eg the above example had some bugs, now removed!

Also with each page printed everything gets reset, thus my Print procedure reinitializes the page each time, otherwise when you try a second page it will be just blank!

Really using the GS> prompt is just like using the BASIC language on eg a BBC computer of yester-year.

A procedure for automatically doing newlines would be

/Line {show Newline} def,

you could feed this new procedure in at the GS> and immediately start using it.

USE GHOSTSCRIPT AS A CALCULATOR:

gs_000

To multiply eg 12.3 x 13.8:

GS> 12.3 13.8 mul ==

To add use add, likewise use sub, div,

To do (2 + 3)/4:

GS> 2 3 add 4 div ==

GS is a stack machine, if we present it with a number, it pushes it onto the stack. When we present it with an operator eg add it pops the operands from the stack, applies the operator and pushes the answer onto the stack. To pop + view the top thing on the stack you type ==. So eg to add 1 2 3 4 5 we could type:

GS> 1 2 3 4 5 add add add add == If the GS prompt says eg GS> < 4 > that means there are 4 unpopped things on the stack. Its useful for debugging.

OK!!!




FURTHER GS8 THINGS


There is a lot of further useful information on the website:
http://www.whoosh777.pwp.blueyonder.co.uk
In particular there is a lot of useful usage info in the doc file for the pre-release, some of the pre-release devices have been superceded by new devices in this release, the pre-release doc file is:
http://www.whoosh777.pwp.blueyonder.co.uk/amiga_readme.RTFI
So browse around and see what is there. In the early stages of the project I was more energetic about the website. As the project neared completion I begun to get very exhausted from the whole effort and less things made their way to the website.

OK!!!




EVERYTHING!


Via gs813:bin/gs -h here is a list of all devices in this recompile, with GS813 the list is alphabetical:

bbox bit bitcmyk bitrgb bj10e bj200 bjc600 bjc800 bmp16 bmp16m bmp256 bmp32b bmpgray bmpmono bmpsep1 bmpsep8 cdeskjet cdj550 cdjcolor cdjmono cljet5 cljet5c deskjet devicen djet500 eps9high eps9mid epson epsonc epswrite faxg3 faxg32d faxg4 ibmpro jpeg jpeggray laserjet lj5gray lj5mono ljet2p ljet3 ljet3d ljet4 ljet4d ljetplus miff24 nullpage pbm pbmraw pcx16 pcx24b pcx256 pcxcmyk pcxgray pcxmono pdfwrite pgm pgmraw pgnm pgnmraw pj pjxl pjxl300 pkm pkmraw pksm pksmraw png16 png16m png256 pngalpha pnggray pngmono pnm pnmraw ppm ppmraw psdcmyk psdrgb psgray psmono psrgb pswrite pxlcolor pxlmono samsung_gdi spotcmyk stcolor tiff12nc tiff24nc tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack tp1 tp24 tp8 tp8g uniprint whoosh1 whoosh24 whoosh8 whooshg xcf
Now do you believe me when I say there is a lot of learning curve?!! NO???
Included in the above list are a lot of graphics formats eg jpeg, png, bmp, there are also lots of wierd things such as many fax formats.
Via the webpage http://www.whoosh777.pwp.blueyonder.co.uk/newgeneral.html I have created some lists that summarise many of the above devices.

OK!!!




COMMENTS


OK!!!




3 or 4 WAYS TO PRINT


There are 4 ways to print, 3 are in this port a 4th one can only be compiled fully via an ixemul recompile hence is missing from this noixemul recompile:
  1. Turboprint
    If your printer is supported by Turboprint then this is the recommended path
  2. Inbuilt Ghostscript printer drivers.
    My printer Samsung ML-4500 b/w 600dpi laser is supported by neither Turboprint nor AmigaOS. This means the only way to print with it on an Amiga is via Ghostscript, this is actually how this port begun. I had to download the Ghostscript c-source driver from a Linux site, then spend a week or 2 debugging it finally I could print! This is the samsung_gdi driver in the device list.
  3. AmigaOS printer driver
    If your printer has an AmigaOS driver (many dont) then this is another method.
  4. ijs
    Available in the ixemul recompile which isnt uploaded yet, (needs a lot of explaining how to set things up for ixemul). -sDEVICE=ijs is an impenetrably complicated method. Its clever but usage is near impossible to understand, I've made some 3 attempts to understand it and given up. Anyway this method allows you to download and use external drivers from the internet and use them with GS8. I think Hewlett-Packard are involved with the concept :I think ijs is one of those a-bit-too-clever ideas! If you get too clever with computers you end up with something which is too difficult to use, L-unix anybody??

OK!!!




PS VS HTML


Sometimes HTML can look like PS! eg on some browsers this doc looks a bit like PS. Dont be fooled though!
PS and HTML are based on totally different concepts:
:PS deals with an absolute page, with absolute colours, absolute positions etc. this means that the same PS document printed out via 10 different printers will always print the identical image (up to the colour + resolution capabilities of each printer).
PS does not deal with bitmaps and pixels, it does everything in an infinite resolution abstract space. This makes all PS images infinitely rescalable. ie PS has truly abstracted the printer.
This means that if you take the printouts from 2 different printers and place one on top of the other and hold them up to the light, both images should superimpose exactly (up to 1 or 2mm at least).
HTML is generally totally relative. If you view this HTML manual via IBrowse, AWEB and Voyager the outcome is totally different in each case. HTML is geared around video screens whereas PS is geared around printers.
:HTML is highly subjective, this allows for a lot of creative license on the part of web browser authors.
HTML is also rendered much faster and it is easier to read HTML source code than PS source code.
PS is a totally standardised foolproof imaging mechanism. What is very useful is you know the precise image the user will see. With HTML the user may get a totally different web-page from the one you thought you designed.
PS is a fantastic method for outputting images, because it is cross-platform and cross-printer. :any platform any printer always the same image! Thus it is very portable and bypasses the need to write printer drivers. In addition to this Ghostscript acts as an excellent generic cross platform printer driver, what is particularly useful is that it sits above the OS rather than within the OS.
The problem of communicating to printers via the OS is that this will usually be non-portable. AmigaOS will talk to its printers quite differently from Mac etc.
Of course its more complex than I have described as the quality of the printer driver also matters eg if you print via Turboprint you get far more authentic colours and dithering.
This documentation is in HTML rather than PS for 2 reasons:
  1. 1. HTML render is fast,
  2. 2. Links!: HTML is interactive via its links PS is not.

:PS is about quality printouts on paper, not mouse+video screen where HTML is more suited.

OK!!!




THE AGA BLITTER BUGS PROBLEM


If you read the OS3.0 graphics docs, the graphics.library Blitter functions have a bug where things fail momentously if bitmaps exceed a width or height of about 1000 pixels. Someone forgot to set an Agnes Big blit flag. This oversight cramps the performance of all my AGA viewers.
These bugs appear not to be present in graphics cards, I fix the problem for AGA machines by imposing a width + height limit of 800 pixels for all bitmaps.
Because graphics.library and cybergraphics.library both use 16 bit arguments (WORD and UWORD), I have imposed a limit of approx 2^15 on all bitmaps Cyber or AGA.
The AGA 800 pixel limit can be increased or decreased for AGA or graphics cards via 2 env-variables whooshxsafe and whooshysafe eg

set whooshxsafe 900 ; limit all bitmaps to
; width <= 900 pixels
set whooshysafe 850 ; limit all bitmaps to
; height <= 850 pixels
; For AGA severe problems will
; happen at 1000 pixels

For graphics cards lowering whooshysafe can be used to speed up the render.

OK!!!




PROBLEMS?


If you have problems eg the Cyber viewers fail to view on your graphics card then:
  1. Study http://www.whoosh777.pwp.blueyonder.co.uk/fix.html, download the latest version of the program if any
  2. If the problem persists email me:

Note that as the Cyber viewers have only been tested on 4 cards that they may fail on other cards. I hope not, but who knows!

OK!!!




THE AGA SetRGB32CM() BUG PROBLEM


The SetRGB32CM() bug: unfortunately the SetRGB32CM() AGA OS call doesnt set the lower 4 bits of the blue component. You can prove this by calling SetRGB32CM() and then studying the blue component via GetRGB32(). I have fixed this bug by directly hacking to memory the correct lower 4 bits of blue. This bug fix could throw an emulator.
For graphics cards I assume the bug is absent so I dont apply the fix, the fix can however be switched on via env variable whooshfix,

set whooshfix 1

For graphics cards SetRGB32CM() is only used if you select a depth 8 screen.
Depth 15, 16 and 24 screens dont use a palette so the bug is irrelevant for their use.

OK!!!




ENV VARIABLES REFERENCE


Debug env variables for -sDEVICE=whoosh24, whoosh8, whooshg and whoosh1:

set whooshv 1 ; verbose on
set whooshdeb 1 ; debug on
:two different levels of shell output, useful for debugging.


set whooshscreen 102400 ; set custom screen to
; a specific screenmode


set whooshwbres 1 ; custom screen to use
; same screenmode as workbench


set whooshw 1 ; WB viewer image to exactly fill
; workbench screen width

Viewer + printer env variables:

set print 0 ; printer off
set print 1 ; printer on
set window 1 ; viewer on
set window 0 ; viewer off
set whooshsuper 1 ; WB viewing on
set whooshsuper 0 ; WB viewing off ==
; custom screen viewer on

set whoosh216 1 ; 216 colour AGA viewing on
set whoosh216 0 ; HAM8 AGA viewing on
set whooshxsafe 850 ; limit bitmaps to width 850
set whooshysafe 700 ; limit bitmaps to height 700
set whooshfix 1 ; switch on SetRGB32CM() bug fix for
; Cyber
set whoosh100 33 ; set viewer refresh timeout to 33/100 seconds ; mustnt be too high mustnt be too low! set whooshfix 0 ; switch off SetRGB32CM() bug fix for
; Cyber
set whoosharrowspeed 30 ; left and right arrow viewer
; scrolling speed, default=15
set overhead 10000000 ; whoosh24, whoosh8, whoosh1
; total print overhead of 10 million
; bytes, ½ this no. of bytes sent to
; printer at a time.
set whooshallzoom 0 ; get AGA very fast h/w autoscroll
; but no zoom in option viewer.
; default is 1==slower but more useful s/w scroll
set whooshreverse 1 ; make scrolling happen in the reverse directions
; some people prefer this,

whoosh100 illustrated above is a new env variable, introduced on 22nd January 2004, it is a fine tuning of the viewer. :it is the timeout for ordinary viewer refresh events. What this means is if you eg scroll around with the viewer, hundreds of mouse events may be generated for this. If each mouse event results in a redraw, then you may have to wait ages for the viewer to catch up. Thus the viewer will ignore such events if they are too late, in particular if they are greater than whoosh100/100 seconds old. The default is 33, ie if an event is later than 1/3 second it will be ignored. Some events are never ignored such as resizing the viewer window.
I think this covers the main env variables. There are dozens of further hidden env variables but these were for debug experiments, and should not be used by the user. Eventually they will all be removed. All of them begin with the prefix whoosh
A generic example of using the above env variables:

set print 0 ; printer off
set window 1 ; viewer on
set whooshsuper 0 ; WB viewer off
; == custom screen on
set whooshwbres 1 ; use WB res
gs:bin/gs -sDEVICE=whoosh24 gs:examples/tiger.eps

would give you a 24 bit colour custom screen viewer (HAM8 for AGA) using the WB resolution.

OK!!!



Miscellaneous downloads

When gs encounters an error it tells you the file position, however what you really want is the line number, so there is now a small program to convert file position to line number in gs860nofpu.lha

Example usage:

gs:bin/pos_to_line examples/tiger.eps 1000

:would tell you the line number of file position 1000 in tiger.eps,

To get usage info type:

gs:bin/pos_to_line

or

gs:bin/pos_to_line ?
gs:bin/pos_to_line examples/tiger.eps 1000 1200

:would print out all text from file position 1000 to 2000 and then tell you the line number of file position 1000 in tiger.eps, eg when I tried it, it does:


/_i currentflat def
/i {dup 0 eq {pop _i} if setflat} bdef
/j /setlinejoin ldef
/J /setlinecap ldef
/M /setmiterlimit ldef
/w /setlinewidth ldef
% path construction operators
/_R {.25 sub round

LINENO = 30


Michael Merkel's GS8GUI

Michael Merkel who was one of the original betatesters for the Turboprint part of the port has written a GUI frontend for the ports of GS I have done.

Its an independent project and this is the URL.

OK!!!



Printing Billboards

This requires the 11th May 2007 binary archive or later.

The current gs860core.lha as of today (17th July 2005) now contains pdf2ps.amiga.

Lets say you want to convert gs:examples/annots.pdf page 2 to 3 x magnification billboard:

Here is how you would do it just to view the parts. To actually print the frames you need to edit gs:bin/view1 and uncomment eg the turboprint command: a row by row column of frames will then be generated by your printer starting with the lowest row and working left to right. You then cut the right + top edges of each frame and glue consecutive frames together. In the "billboard" command below, the first argument is args in "" for GS: we filter out just page 2 here, the next arg is the document, then is the magnification factor: here its 3, then a script file which will be generated (output) ram:script0, then a temporary filename prefix here hd:temp, scratch files hd:temp#? will be generated by the mechanism, then a script file you supply which will view/print the resulting PS files: gs:bin/view1 (ready made one), then the horizontal overlap factor: here its 4 meaning each consecutive horizontal page overlaps with 1/4 of its predecssor. Lastly the vertical overlap factor here 8: vertically frames overlap by 1/8.

:if there are gaps between consecutive frames reduce these 2 parameters till consecutive frames match with absolute precision: should be pixel perfect.

If you run gs:bin/billboard without args it will give you usage info, x0 and y0 define the overlap factors of 1/x0 and 1/y0.

Note that if you dont filter out one page via -dFirstPage and -dLastPage you will get a billboard for every page of the document using a square mile of paper: BEWARE!

(A)
assign gs: gs860:
delete hd:temp#?
gs:bin/billboard "-dFirstPage=2 -dLastPage=2" gs:examples/annots.pdf 3 ram:script0 hd:temp gs:bin/view1 4 8
; :all on one line,
; ie without paths its:
;; billboard "-dFirstPage=2 -dLastPage=2" annots.pdf 3 script0 temp gs:bin/view1 4 8
execute ram:script0

In gs:bin/view1 you can uncomment a line to print the billboard via Turboprint. You can also comment out the line that deletes the images after printing.
You can use this system to generate huge photograph images from an a4 printer: combining the resulting a4 sub-images will be quite a lot of effort.

OK!!!



Printing Novels

This requires the 11th May 2007 binary archive or later.

This puts 2 PDF document pages per physical page side in such a way that when you print on both sides you can column up the pages, fold in half and obtain the correctly numbered pages of a novel. For example a 9 page document is prints as:
(1)[ 2 : . ]
(3)[ 4 : 9 ]
(5)[ 6 : 7 ](8)

As with pamphlets you can use the novel feature several times and then combine these into a tome.

Example: say you want to put pages 90 to 210 of doc.pdf into a novel.

This system ONLY functions for pdf's. To do this with a PS document you need to convert it to PDF first via GS860:lib/ps2pdf.amiga which is Ghostscript's PDF distiller script.

Here is how you now convert pages 90 to 210 of doc.pdf to 2 x 1 x 2 novel. You need a temporary file prefix eg hd:temp or ram:temp (if you have lots of memory). The temp file prefix hd:temp, 90 and 210 are then entered into the following commands. WARNING: all files with prefix hd:temp will be deleted at the start!

(A)
assign gs: gs860:
delete hd:temp#?
gs:bin/novel doc.pdf 90 210 hd:temp
execute ram:script1
execute ram:script2
gs -sDEVICE=???? ?????? hd:temp_0.ps
;WAIT FOR PAPER TO COOL DOWN, EG WAVE PAPER IN THE AIR.
;NOW REINSERT PRINTOUT,
;IF IN FORWARDS ORDER UNCOMMENT THIS:
;gs -sDEVICE=???? ?????? hd:temp_1.ps
;IF IN REVERSE ORDER UNCOMMENT THIS:
;gs -sDEVICE=???? ?????? hd:temp_2.ps
;if unsure whether hd:temp_1.ps or hd:temp_2.ps then view the first
;page of say hd:temp_1.ps with the -sDEVICE=whoosh24 viewer and
;see if it matches the first page to be printed. If it matches now
;print hd:temp_1.ps else print hd:temp_2.ps. Stick a note on the
;printer saying which option to use.

If you run gs:bin/novel with too few args eg no args it will give you usage info.

The above commands will generate hd:temp_0.ps, hd:temp_1.ps and hd:temp_2.ps these are 3 PS files. First print hd:temp_0.ps with GS. This generates the upper faces of the novel. Once printed you have to re-insert these into the printer. If these are in forwards order now print hd:temp_1.ps and if in reverse order print hd:temp_2.ps. Make sure the pages arent upside down!

This will print the lower faces on the same pages.

IMPORTANT: make sure to wait till the pages have cooled down before reinserting. Otherwise the printer will lose its grip and the printout could be wrongly positioned.

Experiment with say 20 pages of a document. If you only want one of forwards or reverse ordering of the second print then comment out the appropriate line of gs:bin/script3n

My printer has 2 output schemes which create opposite out-tray orderings of the print.

When both sides are printed you may need to do a final reversing of page order. I probably need to improve the scheme sometime so that a final reversing isnt necessary.

If you arent sure, instead of printing view temp_0.ps, temp_1.ps and temp_2.ps with whoosh24 and note the page numbering, then figure out from this how to do the reinsertion.

You can create commercial quality booklets with this scheme.

OK!!!



Printing Pamphlets and Books

This requires the 11th May 2007 binary archive or later.

This puts 4 pages per page side in such a way that if you cut the pages in half horizontally, place one half column above/below the other and remove one possibly blank page at the top, staple together you get a pamphlet with correctly sequenced page numbers.

For example the first printout of a 30 page document will have the following page number layout:
2
10 23

Later in phase 2 of the procedure under the 2 will be 1, under the 10 9, under 23 24, and nothing under the empty subframe. ("Notes" candidate!)

The second printout will look like:
4 29
12 21

Later under 4 + 29 + 12 + 21 will be 3 + 30 + 11 + 22 respectively. You dont want to have to do this by hand as its really painful!

BTW I've been thinking about this idea ever since GS8, but couldnt see how to do it then when looking at something Christoph Poelzl asked I suddenly made a breakthrough.

There is quite a bit of puzzle element to the procedure, eg when I first tried it one side was upside down, then when I got it the right way round I was looking at the wrong side of the page, things only make sense if you look at the correct side!

You can also publish your own book by dividing the book into pamphlets and then stitching the pamphlets together into a book.

The pamphlet scheme has some sort of physical limit for convenient browsing, to create a tome you need lots of pamphlets. I think the professionals stitch with string and dont use staples. Staples are for amateurs like me. The problem with staples is though they look bright and shiny today in 10 years time they will have corroded. That shiny lustre will have flaked off causing a health hazard.

Example: say you want to put pages 90 to 210 of doc.pdf into a pamphlet. You can determine the page count of a document via the number GS -sDEVICE=whoosh24 says when you view the document. You can make a tome by splitting the document into several pamphlets.

This system ONLY functions for pdf's. To do this with a PS document you need to convert it to PDF first via GS860:lib/ps2pdf.amiga which is Ghostscript's PDF distiller script.

Here is how you now convert pages 90 to 210 of doc.pdf to 2 x 2 x 2 pamphlet. You need a temporary file prefix eg hd:temp or ram:temp if you have enough ram. The temp file prefix hd:temp and 90 and 210 are then entered into the following commands. WARNING: all files with prefix hd:temp will be deleted at the start!

(A)
assign gs: gs860:
delete hd:temp#?
gs:bin/pamphlet doc.pdf 90 210 hd:temp
execute ram:script1
execute ram:script2
gs -sDEVICE=???? ?????? hd:temp_0.ps
;WAIT FOR PAPER TO COOL DOWN, EG WAVE PAPER IN THE AIR.
;NOW REINSERT PRINTOUT.
;IF IN FORWARDS ORDER UNCOMMENT THIS:
;gs -sDEVICE=???? ?????? hd:temp_1.ps
;IF IN REVERSE ORDER UNCOMMENT THIS:
;gs -sDEVICE=???? ?????? hd:temp_2.ps
;if unsure whether hd:temp_1.ps or hd:temp_2.ps then view the first
;page of say hd:temp_1.ps with the -sDEVICE=whoosh24 viewer and
;see if it matches the first page to be printed. If it matches now
;print hd:temp_1.ps else print hd:temp_2.ps. Stick a note on the
;printer saying which option to use.

If you run gs:bin/pamphlet with too few args eg no args it will give you usage info.

The above commands will generate hd:temp_0.ps hd:temp_1.ps and hd:temp_2.ps these are 3 PS files. First print hd:temp_0.ps with GS. This generates the upper faces of the pamphlet. Once printed you have to re-insert these into the printer. If the reinsertion is in forwards order you now print hd:temp_1.ps and if in reverse order hd:temp_2.ps.

The first time you try this everything will go wrong.

The second print prints the lower faces on the same pages.

IMPORTANT: make sure to wait till the pages have cooled down before reinserting. Otherwise the printer will lose its grip and the printout could be wrongly positioned.

If you comment out one of the 2 commands in gs:bin/script3 you can make only one of the 2 possibilities of forwards versus reverse happen.

My printer has 2 output schemes which create opposite out-tray orderings of the print: I move a lever up or down, if the lever is down the pages leave the printer to the floor (unlimited capacity) and when its up they accumulate within the printer. :both schemes are stacks but one is a face down stack and the other a face up stack.

This scheme is complicated but thats because the problem itself is geometrically quite complicated.

Creating pamphlets is very satisfying.

OK!!!



2 sided printout of Books

This requires the 11th May 2007 binary archive or later.

This takes an input PDF document doc.pdf, and outputs 3 PS documents hd:temp_0.ps, hd:temp_1.ps and hd:temp_2.ps.

The odd pages are in hd:temp_0.ps and the even pages plus maybe a parity synchronising blank page in hd:temp_1.ps as well as in hd:temp_2.ps. hd:temp_1.ps contains the even pages in ascending order and hd:temp_2.ps in descending order.

So you print hd:temp_0.ps then reinsert the pages and print either hd:temp_1.ps or hd:temp_2.ps to get a 2 sided printout.

(You can convert these 2 PS files to PDF via GS860:lib/ps2pdf.amiga, :this script is self documenting)

Example: say you want to print pages 90 to 210 of doc.pdf thus, Note you can find the number of pages in a PDF document by running GS -sDEVICE=whoosh24 and noting the number at the start.

This system ONLY functions for pdf's. To do this with a PS document you need to convert it to PDF first via GS:lib/ps2pdf.amiga which is Ghostscript's PDF distiller script.

Here is how you now convert pages 90 to 210 of doc.pdf to 2 x 1 x 1 book format. You will need to supply the first and last pages 90 and 210 as shown in the example below. You also need a temporary file prefix eg hd:temp. (I use ram:temp). The temp file prefix hd:temp and 90 and 210 are then entered into the following commands. WARNING: all files with prefix hd:temp will be deleted at the start!

(A)
assign gs: gs860:
delete hd:temp#?
gs:bin/book doc.pdf 90 210 hd:temp
execute ram:script1
execute ram:script2
gs -sDEVICE=???? ?????? hd:temp_0.ps
;WAIT FOR PAPER TO COOL DOWN, EG WAVE PAPER IN THE AIR.
;ALSO GOOD IDEA TO FLATTEN THE PAPER.
;NOW REINSERT PRINTOUT, IF IN FORWARDS ORDER UNCOMMENT THIS:
;gs -sDEVICE=???? ?????? hd:temp_1.ps
;IF IN REVERSE ORDER UNCOMMENT THIS:
;gs -sDEVICE=???? ?????? hd:temp_2.ps
;if unsure whether hd:temp_1.ps or hd:temp_2.ps then view the first
;page of say hd:temp_1.ps with the -sDEVICE=whoosh24 viewer and
;see if it matches the first page to be printed. If it matches now
;print hd:temp_1.ps else print hd:temp_2.ps. Stick a note on the
;printer saying which option to use.

If you run gs:bin/book with too few args eg no args it will give you usage info.

The above commands will generate hd:temp_0.ps, hd:temp_1.ps and hd:temp_2.ps these are 3 PS files. First print hd:temp_0.ps with GS. This generates the odd numbered pages. Once printed you have to re-insert these into the printer, if they are in forwards order print hd:temp_1.ps and if in reverse order print hd:temp_2.ps

According to the number of pages there may be 1 synchronising blank page.

IMPORTANT: make sure to wait till the pages have cooled down before reinserting. Otherwise the printer will lose its grip and the printout could be wrongly positioned.

If you know you only need either forwards or reverse order you can comment out the appropriate line in gs:bin/script3b

OK!!!



Printing and viewing thumbnails

This requires the 22nd July 2005 binary or later.

Say you want to view/print doc.pdf in 4 x 4 thumbnails:
set GSFUNCTION T
set GSTHUMBNAIL 4
assign gs: gs860:
gs:lib/pdf2ps.amiga "" doc.pdf doc_thumbnails.ps
unset GSTHUMBNAIL
unset GSFUNCTION

This will generate doc_thumbnails.ps with 4 x 4 thumbnails, ie 16 pages per page.
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

Pages 17, 18 etc will be thumbnailed to the next page etc, and you can have any number of pages eg 3 or 101.

eg you can store the 6 pages of GS860:examples/annots.pdf on one 3 x 3 thumbnail page!

OK!!!



Printing and viewing in landscape

This requires the 15th July 2005 binary or later. Usage has changed since 14th July.

In response to a request by Christoph Poelzl I've customised GS854 onwards so it now can print in landscape.

You need the current binary.

To print/view in landscape say annots.pdf,
assign gs: gs860:
set GSFUNCTION L
pdf2ps.amiga "" annots.pdf annots_landscape.ps
unset GSFUNCTION

This creates a landscape PS file eg annots_landscape.ps eg view it at low res:
gs -sDEVICE=whoosh24 -r50 -dBATCH -dNOPAUSE annots_landscape.ps


OK!!!



Converting problematic True Type fonts to PS fonts

WIARD Thomas (thomas dot wiard at radiofrance dot com) contacted me with the following problem which is about embedding problematic true type fonts in a document as PS fonts.

Various true type fonts (Trebuchet TimesNewRoman CourierNew and Arial) converted to PS fonts via ttf2pt13 from aminet and embedded in a document via Wordworth7 were not rendering "-". The "-" was being rendered with the default undefined symbol which is a square.

We established that the problem was not with GS.

Using nonembedded fonts rendered the - but didnt look the way intended.

The fonts needed to be converted to PS to use on Wordworth7 and to be embedded to preserve the look of the document eg when used with GS860.

All attempts to do this were not rendering the "-" for all the fonts, some attempts rendered the "-" for some of the fonts.

Eventually the following method was found by WIARD Thomas which is entirely via AmigaOS:

1) convert the .TTF font with 'ttf2pt1 -a -b' command into the .PFB file format
2) launch TypeSmith 2.5 software
3) import the .PFB file
4) at the question : "the font has a custom encoding. Load with TypeSmith encoding ?" reply YES
5) export the .PFB file
6) choose the parameter : encoding type - TypeSmith encoding

and then the .PFB file is correct !


OK!!!



Converting PDF and PS to ascii

Someone asked me how you do this, I've converted the ps2ascii script to AmigaOS for this. You use GS:lib/ps2ascii_amiga which is in gs860core.lha since 26th June 2005

Example:

assign gs: GS860:
gs:lib/ps2ascii_amiga GS8