[bug-gs] Re: Question about postscript ...

Ray Johnston ray.johnston at artifex.com
Wed Nov 12 15:04:47 PST 2003


Jordi,

Ghostscript will process both files, but if the first file contains
a 'showpage', then it will (by default) be put on a separate page.

There are a couple of techniques that can be used to suppress the
'showpage' action. The simplest is:

1) Redefine 'showpage' to a dummy procedure, saving the real 'showpage'
    as a procedure that you invoke when you actually want to spit out a
    page:

    1.1) Create a file 'Xshowpage.ps' that contains:

	/RealShowpage /showpage load def
	/showpage { } bind def

    1.2) run the files with something like:

	gs -sDEVICE=pswrite -sOutputFile=onpage.ps Xshowpage.ps file1.ps file2.ps -c "RealShowpage quit"

If this doesn't work, then let me know and I'll give you something
else to try.

Regards,
Ray
____________________________________________________________________

Jordi Sanfeliu wrote:

> 
> Hello Ray,
> 
> Somebody called "stefan911" in the #ghostscript channel at 
> irc.freenode.net, told me to ask you about some question I have.
> 
> I want to merge (or overlap) two .ps files with one page each one into a 
> new .ps file _with_only_one_ page.
> 
> That means I dont want something like:
> 
> cat file1.ps file2.ps > newfile.ps
> 
> I think this would be a very useful tool for people who have a 
> Samba-Printer-Converter-PDF and wants to put the same background image 
> in each page, without to deal with its word-processor.
> 
> I hope you understand me and resolve my problem.
> 
> Thanks in advance.
> 

-- 
Ray Johnston
Director of Engineering                          Tel: (714) 484-0376
Artifex Software Inc.                            Fax: (714) 220-1022
______________________________________________________________________



More information about the bug-gs mailing list