I have a LaTeX file (compiled with pdflatex) with some images in pdf added via the \includegraphics command. The problem is that the images are really big (up to 10MB) and the output file is too large (more than 30MB).
The images have been obtained via the splot command in gnuplot but there are a lot of points in the splot.
I have tried to get the images in other formats (.jpg, .png basically) since the file size is considerably lower and thus the size of my resulting .pdf is also lower. But when I include this files in my LaTeX document the images lose a lot of quality (even though they have OK quality when viewed separately).
How could I get a small pdf file from pdflatex without sacrificing too much quality on the images? I suppose that the problem lies in resizing the image from the pdf-latex but can't solve it. Or in other words, how can I obtain smaller .pdf images (or other format accepted by pdflatex) without losing too much quality when added to the pdf file?
The LaTeX command is \includegraphics[width=7cm]{file.pdf}. Note that I have to resize them to fit 7cm width.
EDIT:
I add 4 files (original images in .pdf, .png and .jpeg and resulting pdf file compiled with pdflatex. Here's the latex code too.
\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[pdftex]{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[width=7cm]{numeric.pdf}
\caption{Pdf file.}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=7cm]{numeric.png}
\caption{Png file.}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=7cm]{numeric.jpeg}
\caption{Jpeg file.}
\end{figure}
\end{document}

pdflatex, even when scaling, there is no loss of information.pdflatexdoesn't alter the image in any way. What you're describing is most likely an issue with your PDF viewer. If you print the document, you should find that the quality is the same as in the original image file. – Jake May 20 '13 at 17:35pdflatexcan't do anything about it, but including the image usingpdflatexwill not degrade the quality in any way. – Jake May 20 '13 at 17:42.epsfile is 20.8MB and when converted to.pdfit is 10.3MB. With other formats (.pngor.jpg) the file size is <1MB and looks good on my image viewer. But on my pdf it looks really bad... – gunbl4d3 May 20 '13 at 17:51epswithdpi=1000", by the way? If it's a vector graphic, thedpidoesn't matter, and if it's a raster graphic, why are you usingeps(it's a vector format in which you can embed raster images)? – Jake May 20 '13 at 17:51dpi=100anddpi=1000produces exactly identical files (which is to be expected, since all the objects are purely vector based). It would be different if you had raster based objects in there, but then you shouldn't be usingformat="eps"butformat="png". – Jake May 20 '13 at 18:13pngcairoterminal to get native antialiasing. – Jake May 20 '13 at 18:35pngcairoterminal (I think). How do I select the proper resolution on Gnuplot? (if you don't know I'll google it) and which resolution do you reccomend? Edit: Will this affect my printing resolution? And why does it happen? – gunbl4d3 May 20 '13 at 18:39pdflatex? – Daniel May 20 '13 at 18:44set terminal pngcairo size 4000,2500 font ",90" lw 10(note that there is no option to specify the resolution directly, unfortunately, so you'll need to take care of scaling the line widths and font size manually). – Jake May 20 '13 at 18:56font ",90" lw 10part. How do I get the numbers? And also, if I want to keep using.pdfimages will they be printed correctly? Is there a way to decrease the resulting pdf size? – gunbl4d3 May 20 '13 at 19:12lwvalue, you use the scaling factor (plot width divided by 640 (the default plot width), so5.94in this example, and for the font size, you multiply the default font size (12) by the scaling factor (71, in this case). Sticking withpdfwould be the best option, but the only real way to decrease the file size is to reduce the sampling frequency of your plot (it's hard to say anything more concrete without knowing how you generate your plot). – Jake May 20 '13 at 19:20.pdfway is a dead-end if I want to improve what I already have. I would vote/thank some of the posts here but I don't really know how... – gunbl4d3 May 20 '13 at 19:50!in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the!to turn it into an image again. – texenthusiast May 21 '13 at 01:58