Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6813957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:37:51+00:00 2026-05-26T20:37:51+00:00

I’m trying to use ghostscript to convert a .ps file to a series of

  • 0

I’m trying to use ghostscript to convert a .ps file to a series of .png files, largely because I don’t have a tolerable ps viewer.

This is the command I’ve used:

gs -dBATCH -dEPSCrop -dEPSFitPage -sDEVICE=png16m -r300  -dNOPAUSE -sOutputFile=neptune_111115_ob1-2_13pca_boloplots_%d.png neptune_111115_ob1-2_13pca_boloplots.ps 

(the .ps file is a multi-page postscript).

The outputs are partly off the page. I’d like the images to fit inside the page.

I can include example files, but they’re pretty large – is there any particular part of the .ps file that would be helpful?

My suspicion is that the .ps file is specifying the bounding box incorrectly, but hacking the BB values didn’t have any effect. The .ps file is written by IDL (ittvis’ Interactive Data Language). I’ve also tried the above command without the -dEPS* commands without luck.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:37:51+00:00Added an answer on May 26, 2026 at 8:37 pm

    -dEPSCrop and -dEPSFitPage are mutually exclusive:

    • One crops the EPS to the BoundingBox specified in the comments.
    • The other scales up the EPS from the %%BoundingBox specified in the PS file’s internal comments to fit the current media.

    You can’t really use both at the same time.

    The file can’t be an EPS file anyway, because you can’t have multiple pages in an EPS file. So actually neither switch will have any effect (as you’ve discovered).

    Either the PostScript requests a media size using setpage or setpagedevice, or it just uses whatever the currently set media is. My guess is that its just using the current media. Try setting -sPAPERSIZE=a4 and -sPAPERSIZE=letter.

    If that works then the program does not request a media size. If it has no effect, then set -dFIXEDMEDIA in addition which will ignore subsequent requests to change the media size.

    That should allow you to specify the correct media size, if you don’t know what the media size should be then you can use the Ghostscript -sDEVICE=bbox device to find out.

    Lastly, Ghostscript has a rudimentary display device which you can use to view the rendered output without first going to a PNG.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have just tried to save a simple *.rtf file with some websites and
I want use html5's new tag to play a wav file (currently only supported
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in
I am trying to render a haml file in a javascript response like so:
I am trying to loop through a bunch of documents I have to put
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.