开发者

Extract image from PDF using .Net c# [closed]

开发者 https://www.devze.com 2022-12-08 20:53 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

开发者_如何学编程

Closed 6 years ago.

Improve this question

I want to extract images from PDF. Tried many solutions but still not getting solution. Help me out....Thanks in advance


Docotic.Pdf library can be used to extract images from PDFs.

Here is a sample that shows how to extract all images from a PDF:

static void ExtractAllImages()
{
    string path = "";
    using (PdfDocument pdf = new PdfDocument(path))
    {
        for (int i = 0; i < pdf.Images.Count; i++)
        {
            string imageName = string.Format("image{0}", i);
            string imagePath = pdf.Images[i].Save(imageName);
        }
    }
}

The library won't resample images. It will save them exactly the same as in PDF.

Disclaimer: I work for Bit Miracle, vendor of the library.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号