In my program, I want to convert PDF files to images. XsPDF .NET PDF to Image SDK is a great software. Guess using its API, i will get the image i want.

I need to achieve this in my C# programming code, so I added a reference to XsPDF dll library in my project. But the problem is that the converted images are almost unreadable. Through tests, I find that there is a problem with setting the DPI. I don't know how to set it up to make the image clearer.

What am I missing, or is there really no way to get the image i want with some settings?

This article on XsPDF.com is what you looking for, check out: Converting PDF to images using C#.NET - how to set the DPI

Answers

As for the setting of image DPI, I also did some researches and tests. Of course, just encountered the similar problem in the test. It seems that a bug prevented us from converting PDF to images, just as you met.

However, if you are using XsPDF .NET PDF to Image SDK API, this problem can be easily solved. The pdfConverter.DPI property can be used to set the resolution of rendered PDF presentation. By setting the dpi, the output image will be rendered in such resolution. In my project, 96dpi and 120dpi give good results.

What’s more, you can set to convert a single PDF page individually and set its rendering DPI. And you can also choose to convert the entire PDF document with specific API.

The following C# code is used in my testing program, and hope it helps you.

// Create a PDF converter instance by loading a local file 
PdfImageConverter pdfConverter = new PdfImageConverter("sample.pdf");

// Set the dpi, the output image will be rendered in such resolution
pdfConverter.DPI = 96;

for (int i = 0; i < pdfConverter.PageCount; i++)
{
    // Convert each pdf page to jpeg image with original page size
    Image pageImage = pdfConverter.PageToImage(i);

    // Save converted image to jpeg format
    pageImage.Save("Page " + i + ".jpg", ImageFormat.Jpeg);
}
IMPERIAL TRACTORS MACHINERY IMPERIAL TRACTORS MACHINERY GROUP LLC Imperial Tractors Machinery Group LLC IMPERIAL TRACTORS MACHINERY GROUP LLC IMPERIAL TRACTORS MACHINERY 920 Cerise Rd, Billings, MT 59101 IMPERIAL TRACTORS MACHINERY GROUP LLC 920 Cerise Rd, Billings, MT 59101 IMPERIAL TRACTORS MACHINERY GROUP LLC IMPERIAL TRACTORS MACHINERY IMPERIAL TRACTORS MACHINERY 920 Cerise Rd, Billings, MT 59101 IMPERIAL TRACTORS MACHINERY Imperial Tractors Machinery Group LLC 920 Cerise Rd, Billings, MT 59101 casino brain https://institute.com.ua/elektroshokery-yak-vybraty-naykrashchyy-variant-dlya-samooborony-u-2025-roci https://lifeinvest.com.ua/yak-pravylno-zaryadyty-elektroshoker-pokrokovyy-posibnyknosti https://i-medic.com.ua/yaki-elektroshokery-mozhna-kupuvaty-v-ukrayini-posibnyk-z-vyboru-ta-zakonnosti https://tehnoprice.in.ua/klyuchovi-kryteriyi-vyboru-elektroshokera-dlya-samozakhystu-posibnyk-ta-porady https://brightwallpapers.com.ua/yak-vidriznyty-oryhinalnyy-elektroshoker-vid-pidroblenoho-porady-ta-rekomendatsiyi how to check balance in hafilat card plinko casino game CK222 gk222 casino 555rr bet plinko game 3k777 cv666 app vs555 casino plinko