How to convert PDF files to images

前端 未结 12 557
庸人自扰
庸人自扰 2020-11-27 14:46

I need to convert PDF files to images. If the PDF file is multi-page,I just need one image that contains all of the PDF pages.

Is there an open sou

12条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 15:03

    As for 2018 there is still not a simple answer to the question of how to convert a PDF document to an image in C#; many libraries use Ghostscript licensed under AGPL and in most cases an expensive commercial license is required for production use.

    A good alternative might be using the popular 'pdftoppm' utility which has a GPL license; it can be used from C# as command line tool executed with System.Diagnostics.Process. Popular tools are well known in the Linux world, but a windows build is also available.

    If you don't want to integrate pdftoppm by yourself, you can use my PdfRenderer popular wrapper (supports both classic .NET Framework and .NET Core) - it is not free, but pricing is very affordable.

提交回复
热议问题