none of the above ([info]aisa0) wrote,
@ 2008-08-07 10:01:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:hacking

[unix] Rotating a postscript file?
I'm having a problem that has blocked me on two separate projects. I can't seem to rotate a postscript file, after trying several tools that should be able to do it.

I have one eps file, 8.5" x 5.5". I'd like to rotate it anti-clockwise 90 degrees, so I can insert it into a booklet. The booklet is typeset in TeX, so I'm including the graphic using \special. The booklet is then converted from dvi to postscript (with the eps file being included at that point), and then to pdf for printing.

In another case, I have a TeX file with the paper size set to 5.5" x 4.25". I have four pages, and I want to rotate each of them clockwise 90 degrees and print them on 8.5" x 11" paper four to a page. The command psnup is working fine for laying them out four to a page, but again I can't succeed in rotating them.

The first command I really need to work as part of a pipeline, though I would accept an interactive tool to solve the second problem.

Anyone have any success or pointers on rotating documents in postscript? Anyone had to work *around* not being able to rotate documents in postscript?




(8 comments) - (Post a new comment)


[info]two_pi_r
2008-08-07 04:27 pm UTC (link)
mogrify -rotate '90<' foo.eps
would be my first guess.

Hand-hacking the postscript may be necessary, though. Figure out how it sets page orientation and turn it to Landscape?

(Reply to this) (Thread)


[info]two_pi_r
2008-08-07 05:01 pm UTC (link)
Also, in LaTeX, \includegraphics has an optional arg rotate: \includegraphics[rotate=270]{foo}.

(Reply to this) (Parent)(Thread)


[info]aisa0
2008-08-07 05:03 pm UTC (link)
I'm using plain TeX, not LaTeX, though one project I could use LaTeX for. Or at least figure out what \includegraphics is doing. Thank you.

(Reply to this) (Parent)


[info]aisa0
2008-08-07 06:22 pm UTC (link)
Heh, that command does work, but it converts the whole thing to an image and writes it back to a postscript file pixel by pixel. The file gets huge, and the result is lossy.

I suppose the one thing it has going for it is that it works, which is better than I've seen yet!

(Reply to this) (Parent)(Thread)


[info]two_pi_r
2008-08-07 06:27 pm UTC (link)
Oops. Yeah, I guess it would rasterize it since ImageMagick isn't really a non-bitmap piece of code.

(Reply to this) (Parent)


[info]jmattax
2008-08-07 10:51 pm UTC (link)
In a couple days I could give you the raw PS to insert, I hack PS when I get a chance.

(Reply to this) (Thread)


[info]aisa0
2008-08-07 10:52 pm UTC (link)
I've found it, variously. I haven't experimented with that yet, as it isn't clear to me that I can just stick it anywhere in the file. This is something that can predictably be inserted into a file and it works?

(Reply to this) (Parent)(Thread)


[info]jmattax
2008-08-07 10:54 pm UTC (link)
That depends on how good the tools you will be using on it are. To do the eps file your best bet is to put a rotate and translate at the beginning of the file and fix the bounding box.

(Reply to this) (Parent)


(8 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…