Solved

Postscript File Manipulation

Posted on 1998-11-30
5
325 Views
Last Modified: 2013-12-02
I have a set of postscript graphics files which are a4 size portraits. I would like to rotate them clockwise through 90 degrees and scale them so that I can fit two on one page in a report.

I have tried using Ghostscript's 'rotate' header file which does the rotation fine, but I don't know how to scale them and I am at a loss to identify the origin of the image so that I know how to offset it once rotated.

Can anyone help? Is there any software on the Internet which isn't called Framemaker and doesn't cost lots of money?

TIA
0
Comment
Question by:cpranderia
  • 3
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
tfabian earned 100 total points
ID: 1113284
try the scale operator in postscript..

it allows you to change the sizze of the units used by postscript. it takes two arguements fom the stack, an x and y scaling factor, and changes the size of the coordinate systems's units by those factors..

eg.  

  3 3 scale

will triple the size of the coordinate systems's units..

objects will be drawn three times as large as they would have been before this command was executed.

so for example, if you want to make your image 1/2 size,
put


5 .5 scale

at the beginning of the postscript file..


you could also accomplish the rotation in a similar fashion (if you want to do everything at once instead of using Ghostscript..


 90 rotate


would rotate 90 degrees..

180 rotate

would rotate 180 degrees...

and so on..

for more details, see pages 49-50 of the

 Postscript Language Tutorial and Cookbook

  by Adobe Systems Inc.




0
 
LVL 5

Expert Comment

by:tfabian
ID: 1113285
on finding the origin point of the image,

 100 200 translate


moves the origin to the point (100,200)

so by cutting and pasting your two postscript files together, with some additions to format the page, you can probably build what you want..


eg.


    100 100 translate
    90 rotate
    .5 .5 scale

    first ps image here minus the showpage command


    200 100 translate
    90 rotate
    .5 .5 scale

    second ps image here including the showpage command



you may have to play with the order of the commands too..


good luck



0
 

Author Comment

by:cpranderia
ID: 1113286
Thanks for the answer - I will try the rotate and scale commands. However, what about offseting the image on the page? For example, if I rotate one image through 90degrees clockwise and scale it down by .5 .5, how would I offset it on the page so that it appeared in the bottom part of the page?
0
 

Author Comment

by:cpranderia
ID: 1113287
Thanks for the help. One last (and probably difficult) question. How do I identify the origin?
0
 

Author Comment

by:cpranderia
ID: 1113288
No need to answer...I just rotated by a small angle and looked at the images to see. The only other thing to say is that I needed to add a grestore where I took out a showpage otherwise the scale and rotate was cumulative. But it works!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to transform png to cdr 8 4,874
top web builder sites 5 124
OCR/ICR 3 574
White background for portrait 9 53
I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Learn how to download your full Prezi presentation for offline presenting. Prezi doesn’t have to be viewed and shared in a web browser, even with a free account you can download your full presentation to share with others. Be sure to download any vi…
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question