GeneralScaling pdf graphics

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
eliwe
Posts: 6
Joined: Tue May 13, 2008 5:36 pm

Scaling pdf graphics

Post by eliwe »

Hi,
I'm having difficulties getting my excel charts into my Latex paper. First I tried making eps but my landscape charts get cropped. Instead I made pdf out of the charts. The problem is that I can't scale them. Whatever I do, they are still huge. So far I've tried scale, width, scalebox and spent a few hours googling to try and find a solution. Anyone here have an idea?

Also, I've been browsing this forum for a while - very helpful! Thanks a lot for all helpful comments for Latex newbies... :-)

//Elisabeth

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Scaling pdf graphics

Post by Stefan Kottwitz »

Hi Elisabeth,

what you wrote should usually work, also with pdf files. I can include pdf files by \includegraphics and they become smaller if I specify the width parameter.
Do you get error messages, warnings? Could you post one such chart pdf here as attachment?
See also the graphicx documentation in case you don't have it already.

Stefan
LaTeX.org admin
eliwe
Posts: 6
Joined: Tue May 13, 2008 5:36 pm

Re: Scaling pdf graphics

Post by eliwe »

Hi Stefan!
I checked the graphicx documentation before but didn't really see anything explaining this.

First I had warnings about pdf version 1.6, max allowed version 1.4 something. So I resaved my pdf's, got rid of the warnings but still have the same problem.

I include two pdf's. One is created from Excel (that one is way too large) using Adobe Acrobat. The other is saved as ps from Inkscape and converted using Distiller. Neither can be scaled but it's only really a problem for the chart since the other drawing was made in the right size. (They have been cropped in Acrobat to get rid of extra whiteness)

One option would of course be to resize the charts in Excel or plot in Gnuplot instead, but I've got a rather large number of charts so I don't really want to do any of that.......

Thanks for the quick reply btw!

//Elisabeth
Attachments
wasteboost.pdf
(13.4 KiB) Downloaded 341 times
chart_cost-CO2b.pdf
(7.62 KiB) Downloaded 309 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Scaling pdf graphics

Post by Stefan Kottwitz »

Hi Elisabeth,

here is an example that works for me:

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage{graphicx}
\begin{document}
\centering
\includegraphics[width=5cm]{wasteboost.pdf}

\bigskip
\includegraphics[width=7cm]{chart_cost-CO2b.pdf}
\end{document}
What happens if you compile this?

Stefan
LaTeX.org admin
eliwe
Posts: 6
Joined: Tue May 13, 2008 5:36 pm

Re: Scaling pdf graphics

Post by eliwe »

I think I found the problem - it seemed to be clashing with another package that I used when I still thought I'd use eps-pictures. I got onto it when your code worked without any problems, with the pictures as floats or not. All the time I thought there must be something wrong with my pdf's.....

Thanks a lot for the help!
Post Reply