PDF to Image - Magick++

前端 未结 1 1790
轮回少年
轮回少年 2021-01-29 04:21

I want to convert a pdf to a series of images using magick++. I currently have this code:

Image  * img = new Image();
img->read(Tests+\"finance-02-2007-multip         


        
1条回答
  •  清酒与你
    2021-01-29 05:06

    That error is telling you that cannot find GhostScript on your computer.

    In order to read a PDF using Magick, you must have GhostScript installed. Magick++ has a (limited) internal support only for writing a pdf. It actually embeds an image in pdf. The reason is that GhostScript is licenced as GPL and cannot be included in Magick, but fortunately can be used if installed by user :).

    Magick checks for a GhostScript via registry. Make sure you have installed a verion of GhostScript and that installation has created one of the keys below in HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE.

    "SOFTWARE\GPL Ghostscript",

    "SOFTWARE\GNU Ghostscript",

    "SOFTWARE\AFPL Ghostscript",

    "SOFTWARE\Aladdin Ghostscript"

    Hope it helps

    0 讨论(0)
提交回复
热议问题