[bug-gs] Re: Question about postscript ...
Ray Johnston
ray.johnston at artifex.com
Thu Nov 13 07:51:49 PST 2003
Jordi,
The 'pswrite' device turns text into bitmaps, so it doesn't look as
good and also is not 'searchable' in the PDF.
You didn't mention that you wanted to go to PDF. You can go directly
to PDF, retaining the high level text, and doing the same type of
technique to suppress the showpage, but use the 'pdfwrite' device.
Note that ps2pdf13 is simply a script that invokes Ghostscript
with the pdfwrite device.
The single step command line to generate the PDF would be:
gs -dSAFER -q -dNOPAUSE -sDEVICE=pdfwrite \
-sOutPutFile=Letter_with_logo.pdf -dCompatibilityLevel=1.3 \
-c .setpdfwrite -f Xshowpage.ps letter.ps logo.eps \
-c "RealShowpage quit"
If you examine the documentation in doc/Ps2pdf.htm or the scripts
lib/ps2pdf13 and lib/ps2pdfwr you can see what the options do.
Regards,
Ray
_________________________________________________________________
Jordi Sanfeliu wrote:
> Ray Johnston wrote:
>
>> 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
>
>
> Hello Ray,
>
> Well, good news ... IT WORKS !!!!!! :-)
>
> There is only one thing that I dont understand. Attached to this email,
> you will find two files created using a bash-script
> (Samba-printer-converter-PDF).
>
> The first one "Letter_with_logo.pdf" was created using your technique:
>
> gs -dSAFER -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutPutFile=newfile.ps
> Xshowpage.ps letter.ps logo.eps -c "RealShowpage quit"
> ... and then finally ...
> ps2pdf13 newfile.ps Letter_with_logo.pdf
>
>
> The second one "Letter_without_log.pdf" was created using the same
> bash-script I used for a long time:
>
> ps2pdf13 letter.ps Letter_without_logo.pdf
>
> If you campare the character quality between the two files you will
> notice that the letter with the logo has a poorly renderized scheme.
>
> What is happening?
>
>
> Thank you very much for your help.
>
More information about the bug-gs
mailing list