How to use Ghostscript for converting PDF to Image

后端 未结 5 1747
轻奢々
轻奢々 2021-01-01 04:42

I found that Ghostscript is able to convert PDF to Image format.

I tried PDF to Image Converter but not able to understand it clearly.

I have installed

5条回答
  •  -上瘾入骨i
    2021-01-01 05:14

    The gsdll32.dll file is not a managed .NET library. You can't reference it in your project. You have to include it in your project as "content" (menu: Add existing item) and let VS copy it to the output directory. Meanwhile you should read the Ghostscript API docs and this article on PInvoke.net on how to reference the Ghostscript functions.

    Keep in mind that Ghostscript is all unmanaged code and that you have to do the clean-up yourself after using the library.

    Edit: What Robert said is important, too. Of course, you have to use the correct version of the Ghostscript library.

提交回复
热议问题