bug-ghostscript
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cutting the inner part of a PS file with Ghostscript & converting th


From: Hans Vossen
Subject: Re: Cutting the inner part of a PS file with Ghostscript & converting the output to PDF.
Date: Thu, 25 Oct 2001 13:49:05 +0200

You may force the device settings on the commandline. What is meant in the
manual is:

either:   gs -c << /HWResolution [400 400] /PageSize [595 842] /Orientation
3  >> setpagedevice -<otheroption>

or put the <<  ..>> setpagedevice in a .ps file (e.g. mysetup.ps) and
process it as first:
           gs -s....      mysetup.ps  myrealfile.ps

In the Postscript ref. manual you can find the behaviour of setpagedevice
keywords.

Good luck !

"Evgenij V. Chikunov" <address@hidden> wrote in message
news:address@hidden
> I have looked through the apropriate newsgroups & was curious if I'm
> the only
> one who have the need for the following.
>
> I have a large set of PS files made for a publishing house. That is,
> we were
> publishing a book and the PS files have many now not needed marks on
> margins.
> We want to quickly convert them into PDF files, but w/o those marks.
>
> The valid area of the documents is within BBox 43.5 64.5 525.75 717
> and all
> the useless marks are outside. I tried to cut the outer area with
> Ghostscript's
> ps2pdf batch files, specifying all possible parameters I have found
> and all
> I have accomplished so far is conversion to PDF & cut of the right &
> top part
> of useless info on pages. I need now a way to cut the bottom & left
> parts.
>
> I have noticed that there are several mentions of possibilities to
> position
> BBox by GS commands, to position start of the document pages
> coordinate system,
> to rotate document by deliberately selecting wrong orientation of
> pages and so
> on, but all these options either do not work in my GS6.01 or just
> mentioned
> w/o any trace of how to invoke them.
>
> For sample, my
> -dORIENT1=true
> or
> -dORIENT1=false
> settings just seem to be ignored by Ghostscript6.01 and page
> orientation gets
> changed from landscape (in PS files) to portrait in resulting PDFs if
> &
> only if I specify
> -dFIXEDMEDIA
> switch, which dont seem to be connected to it and regardless of other
> switches.
> (but the PAPERSIZE parameter must represent a portrait type or left
> blank to
> use the default one)
>
> In Use.html it is mentioned that
>
> ..Note that the initialization file gs_init.ps makes systemdict
> read-only, so the values of names defined with -D, -d, -S, and -s
> cannot be changed -- although, of course, they can be superseded by
> definitions in userdict or other dictionaries. However, device
> parameters set this way (PageSize, Margins, etc.) are not read-only,
> and can be changed by code in PostScript files. ...
>
> But there is no way for me to get how I can change these values,
> namely, PageSize & Margins from command line or elseway, for I tried
> all that
> came to my imagination, searched entire GS directories & tried to
> change
> the apropriate fields in every file I found to contain "PageSize" or
> "Margins".
>
> Neither can I get what they meant by the following -
>
> *exerpt from file align.ps in lib directory*
> For correct alignment of pages, put the following line
> in a file named (for example) margins.ps, and then mention
> margins.ps on the gs command line when printing any of your
> own files:
>
>     <<  /.HWMargins [ml mb mr mt] /Margins [x y]  >>  setpagedevice
> *end exerpt*
>
> What do they mean by 'mention file on command line'? It sound for me
> much like
> 'just say the program to work the right way', but I tried all the ways
> of 'mentioning' the file I created in the command line & it led me
> nowhere.
>
> The other way suggested somewhere out there was to put
> "number" "number" translate
> in the beginning of PS file or in GS command line. I tried both in
> several
> ways & failed to see any good out of it.
>
> Perharps I've missed something but I spent 2 weeks now on this task &
> it looks like I cant solve this on my own. I have not found helps on
> GS I didnt looked
> through. I'd greatly apreciate if you point me on the correct syntax
> of a
> GS command that can help me with it or suggest any other program that
> can
> perform the same thing of cutting bottom-left part of an PDF or PS
> document.
>
> Auxilary question - can GS cut several pages out of PS file directly?
> Now to have some pages in separate file I have to create PDF file from
> PS & cut them into another PDF file using
> -dFirstPage=pagenumber
> -dLastPage=pagenumber
> switches. The options that create multiple one-page files by selecting
> Outputfile as XYZ%02d.ABC/XYZ%%02d.ABC or alike simply produce one
> file with all pages, named XYZ01.ABC or smth like. The same thing
> happens if I use
> First/LastPage with PS file itself.
> Sounds like a bug.
>
> I have tested all of the following on GNU GS6.01 & going now to do the
> same with
> GS7.00, but I suppose the things will go the same since I didnt found
> much
> differences in their documentation files.
>
> Thanks for your help beforehand & sorry that this gone too long - I'm
> rathe new
> with this newsgroups thing yet.
>
> Evgenij
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]