0

I have an EPS file generated by MATLAB. When I convert it to PDF using either ps2pdf or ghostscript, parts of the EPS goes outside the page boundaries and are hence lost(as if the EPS was bigger than the set page width) Converting the EPS to tiff or PNG also gives the same problem.

  • How to make gs select pagewidth automatically, corresponding to the input file ?

or

  • How to scale the EPS before converting it to PDF ?

I tried doing it with LaTeX (which I haven't used much), but it generates a lot of whitespace. I figured out that aligning pictures in LaTeX is not that straightforward.

Please suggest me how to get the conversion right, but without LaTeX.

WYSIWYG
  • 494
  • 6
  • 23

1 Answers1

1

EPS files don't declare a media size, try using -dEPSCrop

KenS
  • 30,202
  • 3
  • 34
  • 51
  • `ps2pdf -dEPSCrop in.eps` indeed works, but does not rescale. EPS does have a bounding box and can result in teeny, tiny or large-scale pdf output. So, this answers the first but not the second question. The question should have asked for 'or' and not 'and'. – ivo Welch Jan 26 '16 at 23:02