diff options
Diffstat (limited to 'hm/soispha/pkgs/scripts/apps/con2pdf')
-rw-r--r-- | hm/soispha/pkgs/scripts/apps/con2pdf | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hm/soispha/pkgs/scripts/apps/con2pdf b/hm/soispha/pkgs/scripts/apps/con2pdf index 4a45250e..f0942a5c 100644 --- a/hm/soispha/pkgs/scripts/apps/con2pdf +++ b/hm/soispha/pkgs/scripts/apps/con2pdf @@ -84,9 +84,11 @@ process_images_adf() { pdf_counter=0; image_cache="$(mktmp)" while read -r scanned_image; do + dbg "$scanned_image (scanned_image) at $counter (counter)"; echo "$scanned_image" >> "$image_cache" : $((counter += 1)) if [ "$counter" = "$number_of_pages" ]; then + dbg "$counter == $number_of_pages" counter=0; convert_images_flatbed "$image_cache" "${name}_$pdf_counter" "$output_directory" : $((pdf_counter += 1)) @@ -133,13 +135,14 @@ convert_images_flatbed() { set -- while read -r image; do + dbg "setting image: $image"; set -- "$@" "$image" done < "$image_cache" while [ -e "$output_dir/${name}.pdf" ]; do name="${name}_$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 25)" done - + dbg "using name: $name"; convert "$@" -compress jpeg -quality 100 "$output_dir/${name}.pdf" } |