Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Resizing Eps/ps files

  1. #1
    Join Date
    Oct 2005
    Location
    Szeged Hungary
    Beans
    54
    Distro
    Lubuntu Development Release

    Resizing Eps/ps files

    Hi people

    To publish a scientific article, I need to rescale all my eps figures to the appropriate size. I've tried googling around for ghostscript solution not no avail. Importing into inkscape isn't an option as it doesn't successfully import the figure

    Does anyone have any suggestions or recipes

    Cheers

    Andy
    Last edited by vancheese; June 14th, 2010 at 08:12 AM. Reason: I pushed enter too soon before post was finished!

  2. #2
    Join Date
    Oct 2007
    Location
    Oregon, USA
    Beans
    1,534

    Re: Resizing Eps/ps files

    If you're using LaTeX it's trivial. Just do something like this:

    Code:
      \includegraphics[width=60mm]{myfig.eps}

  3. #3
    Join Date
    Oct 2005
    Location
    Szeged Hungary
    Beans
    54
    Distro
    Lubuntu Development Release

    Re: Resizing Eps/ps files

    Yes, I know, but the journal wants the picture files submitted in the right size!
    For 95% of the time, that would work perfectly

  4. #4
    Join Date
    Oct 2007
    Location
    Oregon, USA
    Beans
    1,534

    Re: Resizing Eps/ps files

    What do you mean by the right size? Do you mean the embedded preview image? Or are they not able to process eps files?

    I don't really understand why setting the width of the graphic isn't acceptable here.

  5. #5
    Join Date
    Nov 2009
    Location
    East Anglia
    Beans
    415
    Distro
    Xubuntu

    Re: Resizing Eps/ps files

    Quote Originally Posted by vancheese View Post
    Yes, I know, but the journal wants the picture files submitted in the right size!
    For 95% of the time, that would work perfectly
    How about something like:
    Code:
    pstops 1:0@0.8 infile.ps outfile.ps
    which would resize all pages in infile.ps to 80% of their original size in outfile.ps.

    H

  6. #6
    Join Date
    Oct 2007
    Location
    Oregon, USA
    Beans
    1,534

    Re: Resizing Eps/ps files

    Oh, that's a good program to know about.

    Still, I don't get why scaling inside of the LaTeX document isn't acceptable. I haven't heard of this before. Asking you to scale the EPS sounds a lot like someone asking you to scale a TrueType font.

  7. #7
    Join Date
    Jan 2008
    Beans
    20

    Re: Resizing Eps/ps files

    Maybe Image Magick would be an option for the job. Open your image

    Code:
    display myimage.eps
    Resize and export it as a eps file.

  8. #8
    Join Date
    Oct 2005
    Location
    Szeged Hungary
    Beans
    54
    Distro
    Lubuntu Development Release

    Re: Resizing Eps/ps files

    I found that I can do this all in scribus so I have!
    I will try out these tips too!

    Thanks

    Andy

  9. #9
    Join Date
    Oct 2005
    Location
    Szeged Hungary
    Beans
    54
    Distro
    Lubuntu Development Release

    Re: Resizing Eps/ps files

    Quote Originally Posted by Chronon View Post
    .

    Still, I don't get why scaling inside of the LaTeX document isn't acceptable. I haven't heard of this before. Asking you to scale the EPS sounds a lot like someone asking you to scale a TrueType font.
    I know, But this journal is a bit silly, I am using their latex style file and it differs from what they ask from in the authors' guidelines
    Last edited by vancheese; June 16th, 2010 at 01:05 PM. Reason: improving the grammar

  10. #10
    Join Date
    Apr 2011
    Location
    Barcelona
    Beans
    34
    Distro
    Ubuntu 12.04 Precise Pangolin

    Lightbulb Re: Resizing Eps/ps files

    Good day!

    Chronon, you're completely right that it's a stupid thing to do, but nevertheless some scientific publications require you to do it, like the Journal of Chemical Physics. Which frankly seems to me like a useless pain in the *ss for all of us.

    I guess they want to make sure that, even if authors work in oversized graphs, at least in this last step they will realise that the text they put in them is way too small to be read in the real size. At least, that's the only logical explanation that occurred to me.

    I also find myself now on the need of resizing the EPS files again for this same reason.

    In the past, I used some kind of graphics program to import the EPS, resize it, and then export it again. Sometimes converting first the EPS file to PDF format, because some programs import it better. Although I could make this solution work, I wasn't very happy about it: some programs mess it up when importing EPS or don't export them in very good quality.

    So, since I knew that EPS graphs where defined using the Postscript programming language, I thought that it would be much neater to directly modify the code that generates the graph, to obtain the image in the required size. I explain here how I did it, in case someone finds it useful.

    1. Install some kind of hexadecimal editor (I went with Midnight Commander).
    2. Open the EPS file with it and add the following line after the EPS header (where sx and sy are the factor values you need to rescale the image to the required size).
      Code:
      sx sy scale
    3. Edit the x and y values in the following line to define the corresponding new page size (otherwise your graph will have useless blank space or the image will be cropped).
      Code:
      %%BoundingBox 0 0 x y
      In one of the graphs there was this extra line and I also had to change the x and y values.
      Code:
      %%PageBoundingBox 0 0 x y

    I don't know whether the experts will be horrified, but it worked perfectly for me.

    Cheers!
    Last edited by Margaret Dumont; January 25th, 2012 at 01:41 AM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •