Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I successfully created an animation PDF from mulitple PDF pages by using the animate package, but the problem is that the output graphics size is about half the size of the original.

How can I preserve the original size? Any hints?

Here is my .tex code for running pdflatex:

\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{animate}
\begin{document}
\animategraphics[controls,autoplay,loop, width=1\linewidth]{1}{file}{1}{13}
\end{document}
share|improve this question

2 Answers 2

if you want the natural width do not use the width setting.

\noindent
\makebox[\textwidth]{\animategraphics[controls,autoplay,loop]{1}{file}{1}{13}}
share|improve this answer
    
thanks for the kind help. i have deleted width=1\linewidth and i got the original size ! but now i have another problem - part of the graphics is shifted to the right, outside the page. i don't understand why this happen because my original pdf does fit it nicely inside a page of A4. when i pdflatex, i did get the message of "Overall hbox (160.89pt too wide) in paragraph at lines 6--7. Anyway, if you know the way to shift the graphics about 3cm left in the final animation pdf, pls tell me ! thks for ur support ! –  Graham Li Jan 4 '12 at 10:48
    
try \makebox[\textwidth]{\animate....} –  Herbert Jan 4 '12 at 11:03
    
Strange. \includegraphics{file1} and \animategraphics{1}{file}{1}{13} should produce boxes of exactly the same size. –  AlexG Jan 4 '12 at 11:09
    
Put \noindent\animategraphics[controls,autoplay,loop,width=\textwidth]{1}{file}{1}{‌​13} on a line of its own. This will produce an animation which takes up the maximum allowable width without overfull \hbox messages. –  AlexG Jan 4 '12 at 11:16
    
\makebox[\textwidth]{\animategraphics[controls,autoplay,loop]{1}{C}{1}{5}} did the trick ! the graphics shift right and now pretty much at the center with original size preserved, thanks ! –  Graham Li Jan 4 '12 at 11:33

Just omit any post-scaling options, such as width or scale. Then the original size, that is the size of the first graphics of the sequence, will be used for the animation.

In your case, width=1\linewidth will resize the width of the animation to the line width of the hosting document. This is the largest width I would recommend, as a larger animation would extend into the page margin or beyond, generating overfull hbox warning messages. If the result is indeed half the original size, the original size would be far too big to fit into your hosting document. Thus, width=1\linewidth seems to be a sensible choice.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.