Є такий пакет "imagemagick", у складі якого є утиліта "convert":
NAME
convert - convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
SYNOPSIS
convert [input-option] input-file [output-option] output-file
OVERVIEW
The convert program is a member of the ImageMagick(1) suite of tools. Use it to convert between image formats as well as resize an image, blur, crop, despeckle,
dither, draw on, flip, join, re-sample, and much more.
For more information about the convert command, point your browser to file:///usr/share/doc/imagemagick/www/convert.html or http://www.imagemagick.org/script/con‐
vert.php.
Так от, для того щоб перевести файл PDF у зображення достатньо лише надати у першому аргументі початковий файл та дати назву вихідному файлу із розширенням. Наприклад:
#convert мій_файл.pdf нове_зображення.jpg
Але якщо у файлі PDF є текст, то із параметрами за замовчуванням він буде дуже погано конвертований у зображення.
Для підвищення якості треба додати аргумент "-density 300". Приклад:
#convert -density 300 мій_файл.pdf нове_зображення.jpg
NAME
convert - convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
SYNOPSIS
convert [input-option] input-file [output-option] output-file
OVERVIEW
The convert program is a member of the ImageMagick(1) suite of tools. Use it to convert between image formats as well as resize an image, blur, crop, despeckle,
dither, draw on, flip, join, re-sample, and much more.
For more information about the convert command, point your browser to file:///usr/share/doc/imagemagick/www/convert.html or http://www.imagemagick.org/script/con‐
vert.php.
Так от, для того щоб перевести файл PDF у зображення достатньо лише надати у першому аргументі початковий файл та дати назву вихідному файлу із розширенням. Наприклад:
#convert мій_файл.pdf нове_зображення.jpg
Але якщо у файлі PDF є текст, то із параметрами за замовчуванням він буде дуже погано конвертований у зображення.
Для підвищення якості треба додати аргумент "-density 300". Приклад:
#convert -density 300 мій_файл.pdf нове_зображення.jpg
Немає коментарів:
Дописати коментар