Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

498
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda