English Indonesia Tiếng Việt عربي Español Italiano Türk فارسی Français Português Русский ไทย

PDF to PNG in C#

Converting PDF pages to PNG is a common software processing task. In scenarios where you need to extract certain data from a PDF document, converting document pages to PNG images can simplify the task. Extracted PNG images can be easily embedded into other documents or websites. Displaying PDF content as PNG on websites ensures consistent rendering across different browsers and devices without needing a PDF viewer plugin. This type of integration enhances the visual appeal of the content and allows for a more dynamic use of the information originally contained in the PDF format.

Wordize for .NET can handle even the most complex PDF document layouts, ensuring all pages retain their professional appearance when converted to PNG images.

Key features of PDF to PNG conversion in C#:
  • High-performance PDF document processing
  • Accurate preservation of document styling, including fonts, colors, and layout elements
  • Precise rendering of tables, embedded images, and graphics

Ready to enhance your document processing workflow with cutting-edge PDF page rendering technology? Begin transforming PDF documents into high-quality PNG using Wordize for .NET today!

C#
Run code
Test Wordize SDK - upload document and explore code sample
Select the target format from the list
using Wordize.Conversion;
using Wordize.Saving;

var imageStreams = Converter.ConvertToImages("Input.pdf", new ImageSaveOptions(SaveFormat.Png));

foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i)))
{
    using var _ = stream;
    stream.Position = 0;
    
    using var file = File.Create($"Output_{page + 1}.png");
    stream.CopyTo(file);
}
using Wordize.Conversion; Converter.Convert("Input.pdf", "Output.png"); using Wordize.Conversion; using Wordize.Saving; var imageStreams = Converter.ConvertToImages("Input.pdf", new ImageSaveOptions(SaveFormat.Png)); foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i))) { using var _ = stream; stream.Position = 0; using var file = File.Create($"Output_{page + 1}.png"); stream.CopyTo(file); } using Wordize.Conversion; using Wordize.Saving; ImageSaveOptions saveOptions = new ImageSaveOptions(saveFormat); saveOptions.PageLayout = MultiPageLayout.Vertical(10); Converter.Create() .From("Input.pdf") .To("Output.png", saveOptions) .Execute();
Run code

How to convert PDF to PNG in C#

  1. Add Wordize for .NET to your C# project
  2. Call the Convert method, specifying input and output file names in parameters. Formats will be automatically determined based on file extensions
  3. Get the PNG file
5%