Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
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 :
#!/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
I tried with this option, but the result is the same.
In fact, the lack of quality not seen the pdf file, but only on paper after printing, maybe the problem is not with imagemagick.
#!/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";
convert -density 400 "$f" -crop 1x2+00+20@ -scale 100% +repage +adjoin "$(basename $f .ppm)-1x2@_%d.pdf";
done
convert -density 400 "temp-*@*.pdf" "$(basename "$var" .pdf)-agrandi.pdf" # Assemblage des fichiers PDF agrandis
rm -r temp* "$var-crop" # Suppression des fichiers temporaires
done
Can you post a link to an example pdf and the exact command to process it rather than the script. That is fill in the parameters with values and file names. That way we can test ourselves to see what may the issue.