Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

500
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda