Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // I am pretty sure this one should work, but couldn't find how to do it in php:
- convert -density 288 in.pdf -resize 25% out.png
- // thus this one:
- convert -density 600 in.pdf -threshold 15% -type bilevel -compress fax out.pdf
- // Also found this one:
- convert -density 288 image.pdf -resize 25% -threshold 50% -type bilevel image.tiff
- $img = new Imagick('path/to/document.pdf');
- $img->quantizeImage(2, // Number of colors
- Imagick::COLORSPACE_GRAY, // Colorspace
- 50, // Depth tree
- TRUE, // Dither
- FALSE); // Error correction
- $img->writeImage('path/to/output.png')
Add Comment
Please, Sign In to add comment