Quality when converting
Posted: 2012-09-04T09:26:27-07:00
Hi 
I wrote a script that divides each page of a pdf into two, so that you can print twice as large with the same paper size.
But the quality of file at the end is too low, and I do not know why and how to fix it.
Can you help me please?
Here is the script :
Flo

I wrote a script that divides each page of a pdf into two, so that you can print twice as large with the same paper size.
But the quality of file at the end is too low, and I do not know why and how to fix it.
Can you help me please?
Here is the script :
Code: Select all
#!/bin/sh
for var in "$@"; do
pdfcrop "$var" "$var-crop" # Suppression des marges
pdftoppm "$var-crop" temp # Convertir la PDF en images
for f in temp-*.ppm; do # Découpe des images et conversion pdf
convert "$f" -crop 1x2+00+20@ -scale 100% +repage +adjoin "$(basename $f .ppm)-1x2@_%d.pdf";
done
convert "temp-*@*.pdf" "$(basename "$var" .pdf)-agrandi.pdf" # Assemblage des fichiers PDF agrandis
rm -r temp* "$var-crop" # Suppression des fichiers temporaires
done