Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using this command

mogrify -format pdf -page a5  iguana2.jpg 

to convert a jpg file into a pdf. The problem is that the result has a white border. I'd like the image to full fill the a5 page (it's ok if borders of the image are lost).

original image result

share|improve this question

1 Answer 1

If you don't have to use IM, I suggest using LaTeX to realize this. The following tex code is an example.

\documentclass[a5paper]{article}
\RequirePackage[margin=0in]{geometry} 
\RequirePackage{graphicx}       

\begin{document}

\begin{figure}[!htb]
    \centering
    %\includegraphics[width=1.0\columnwidth]{example.jpg} # if the width > height
    \includegraphics[height=1.0\paperheight]{example.jpg} # if the height > width
\end{figure}

\end{document}

The code is very easy to understand. Use latex compile it.

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.