Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

497
Views
How to save a PDF as an image with C#/Javascript?

I'm currently working on a Unity project and I need to be able to open a PDF received from an API call. I'm able to download the PDF just fine, but now I need to convert it to an image so I can display it as a texture in Unity (I'm aware there's a PDF viewer on the asset store but I'm not willing to spend the money for this project). My question is, how can I do this? It seems very easy to do with Javascript with the PDF.js library, however I'm not sure how I'd execute Javascript code within C#. I'm looking for something along the lines of opening the already downloaded PDF in the browser, converting it to an image, and then using this image in my C# code. Any advice on how I could go about this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the C# .NET IronPDF Library to achieve this easily. Simply create a ChromePdfRenderer using C# then create Bitmaps from an input PDF.

Simply return each page as an image as shown in the last line and now every page is a seperate JPG/PNG file.

using IronPdf;

var Renderer = new IronPdf.ChromePdfRenderer();

PdfDocument Pdf = new PdfDocument("inputexample.pdf");

System.Drawing.Bitmap[] pageImages = Pdf.ToBitmap();

Pdf.RasterizeToImageFiles(@"thumbnail_*.jpg");

A full code example can be found here.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!