Page 1 of 1

PDF problems: multiple-page PDFs, low image quality

Posted: 2007-08-30T21:40:38-07:00
by ZacharyB
Hi guys,

I have a couple questions.

1. How can I create multi-page PDFs using ImageMagick? I've tried doing a `convert page1.pdf page2.pdf -append output.pdf`, but that just stacks the pages into a single-page PDF.
2. What kind of image size/quality (PNG) do I need to ensure that the PDF I create prints nicely, with the quality of the graphic?
3. "Print preview" generally doesn't work when I print-preview PDFs created with ImageMagick. Any tips?

Thanks a lot,
Zack

Re: PDF problems: multiple-page PDFs, low image quality

Posted: 2007-08-31T00:13:39-07:00
by ZacharyB
Okay,

1. I figured out you can't do that with ImageMagick, so I ended up using using this bash script. It requires a latex installation. Put it in a file, save it, type chmod file 755, then do ./file output.pdf input1.dpf input2.pdf input3.pdf ... inputn.pdf

Code: Select all

#!/bin/bash
cat <<ENDTXT >__tmp__.tex
\documentclass[portrait]{article}
\usepackage{pdfpages}
\begin{document}
ENDTXT
outnm=$1
count=`echo "$# - 1" |bc`
for f in `seq $count`; do
shift
echo "\includepdf[pages=-]{$1}" >>__tmp__.tex
done
echo "\end{document}" >>__tmp__.tex
pdflatex __tmp__.tex
rm __tmp__.{tex,aux,log}
mv __tmp__.pdf $outnm
Not my script, but I'm reposting here so people googling the problem might have a better chance at solving it.

2. Ignore this, I fixed the problem.
3. Still trying to figure this out.