PDF2JPEG conversion font problem
Posted: 2010-09-02T08:03:18-07:00
Hello!
I need to convert pdf to jpeg. So I use next code:
Code successful converts pdf to jpeg, but with wrong font (or wrong text decoration - I don't no).
I tried some solutions:
1) Add font from pdf to ~/.fonts/
2) Add code:
3) Add ~/.magick/type.xml (using script imagick_type_gen)
But everything takes no effect.
Hope you can help me find a solution. You're the last hope)
Here you can download zip (rassol.zip) with generated image and pdf
I need to convert pdf to jpeg. So I use next code:
Code: Select all
$im = new Imagick('some.pdf');
$im->setImageColorspace(255);
$im->setCompression(Imagick::COMPRESSION_JPEG);
$im->setCompressionQuality(30);
$im->setImageFormat('jpeg');
$im->writeImage('some.jpg');
$im->clear();
$im->destroy();
I tried some solutions:
1) Add font from pdf to ~/.fonts/
2) Add code:
Code: Select all
$im->setFont('times_new_roman.ttf');
But everything takes no effect.
Hope you can help me find a solution. You're the last hope)
Here you can download zip (rassol.zip) with generated image and pdf