Forgive me if I use improper terminology here. I was planning to use .pdf files for images (overview: Matlab generates .eps files, which I then convert to .pdf with eps2pdf). Most of the images convert fine, but there are some files that simply do not convert well at all, and I'm not sure why. A friend was able to convert successfully to .pdf, but I can't mine to work correctly (for this file). I've uploaded both the original .eps file -- large download -- and the converted .pdf in hopes that someone may have a suggestion as for what to do.
http://netfiles.uiuc.edu/xwang22/Public ... avelet.eps
http://netfiles.uiuc.edu/xwang22/Public ... avelet.pdf
Conversion Tools ⇒ epstopdf doesn't maintain image quality? (MacTeX)
-
- Posts: 6
- Joined: Fri Feb 05, 2010 7:35 pm
Re: epstopdf doesn't maintain image quality? (MacTeX)
Could you create a smaller sample to test with? I'm not downloading a 25 MB .eps file to experiment with. That would be very inefficient.
-
- Posts: 6
- Joined: Fri Feb 05, 2010 7:35 pm
Re: epstopdf doesn't maintain image quality? (MacTeX)
Unfortunately, the only .eps files that don't convert correctly on my machine are the larger ones. 

- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
epstopdf doesn't maintain image quality? (MacTeX)
The problem of your PDF file is that it is the result of a conversion with low resolution. I got the EPS file from the source you gave and converted it manually with ps2pdf on the command line.
Afterwards you have to crop the PDF by using the Perl script pdfcrop. This will require an installed Perl interpreter [1]. The final result is attached.
Supplement:
I also managed to convert the file with epstopdf on the command line.
Somehow the program didn't seem to stop. But the result was OK. The advantage is that the output needs no subsequent cropping.
[1] The Dynamic Languages Company: Perl, Python and Tcl - ActiveState
Best reqards
Thorsten
Code: Select all
ps2pdf -r600 young_mirror_lowavelet.eps young_mirror_lowavelet.pdf
Supplement:
I also managed to convert the file with epstopdf on the command line.
Code: Select all
epstopdf --gsopt=-r600 young_mirror_lowavelet.eps
[1] The Dynamic Languages Company: Perl, Python and Tcl - ActiveState
Best reqards
Thorsten
- Attachments
-
- young_mirror_lowavelet-crop.pdf
- The final result after processing the EPS file.
- (25.63 KiB) Downloaded 509 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
-
- Posts: 6
- Joined: Fri Feb 05, 2010 7:35 pm
epstopdf doesn't maintain image quality? (MacTeX)
Thanks for the reply! The pstopdf command does generate a pdf of "correct" resolution, but on a Mac, the command you provided --
is not recognized. I tried instead
,
but this doesn't change the output from the default. The options that I see are:
Am I using the correct syntax in the options?
Code: Select all
epstopdf --gsopt=-r600 young_mirror_lowavelet.eps
Code: Select all
epstopdf --res=600 young_mirror_lowavelet.eps
but this doesn't change the output from the default. The options that I see are:
Code: Select all
Usage: epstopdf [OPTION]... [EPSFILE]
Convert EPS to PDF, by default using Ghostscript.
Options:
--help display this help and exit
--version display version information and exit
--outfile=FILE write result to FILE
--(no)compress use compression (default: true)
--(no)debug write debugging info (default: false)
--(no)embed embed fonts (default: true)
--(no)exact scan ExactBoundingBox (default: false)
--(no)filter read standard input (default: false)
--(no)gs run ghostscript (default: true)
--(no)hires scan HiResBoundingBox (default: false)
--gscmd=VAL pipe output to VAL (default: gs)
--res=DPI set image resolution (default: [use gs default])
--autorotate=VAL set AutoRotatePages (default: None)
Recognized VAL choices: None, All, PageByPage
For EPS files, PageByPage is equivalent to All
--restricted use restricted mode (default: false)
Examples for producing 'test.pdf':
* epstopdf test.eps
* produce postscript | epstopdf --filter >test.pdf
* produce postscript | epstopdf -f -d -o=test.pdf
Example: look for HiResBoundingBox and produce corrected PostScript
* epstopdf -d --nogs --hires test.ps >testcorr.ps
epstopdf doesn't maintain image quality? (MacTeX)
Don't bother with eps to pdf conversion and instead produce pdf directly from MATLAB:
http://www.mathworks.com/matlabcentral/ ... ange/16179
Cheers,
Tomek
http://www.mathworks.com/matlabcentral/ ... ange/16179
Cheers,
Tomek
-
- Posts: 6
- Joined: Fri Feb 05, 2010 7:35 pm
Re: epstopdf doesn't maintain image quality? (MacTeX)
Hum, interesting -- thanks for that snippet!
I was playing around earlier this morning and noticed that "--noembed" seems to help with those figures (that is, ones similar to the .eps file I attached) as well. Either way, thanks for the Matlab tip -- it'll save one step in the data processing chain.
I was playing around earlier this morning and noticed that "--noembed" seems to help with those figures (that is, ones similar to the .eps file I attached) as well. Either way, thanks for the Matlab tip -- it'll save one step in the data processing chain.
