Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to turn a PDF file saved as a byte[] to png or jpeg byte[] List in C#? [closed]

$
0
0

I'm working on a blazor project where I need to convert a PDF document, which is stored as a byte[], into a list of PNG images, also stored as byte[], with each image representing a page from the PDF. The solution needs to be cross-platform (Windows, Linux, macOS) and cannot rely on any paid or non-commercially usable tools.

Here’s what I’m trying to achieve:

Input: A PDF document as a byte[].Output: A List<byte[]> where each byte[] is a PNG image corresponding to a page in the PDF.

Constraints:The solution must be cross-platform.

I cannot use any paid libraries or tools (e.g., Adobe SDK).

The tools/libraries used must be commercially usable (e.g., open-source with permissive licenses like MIT, Apache, etc.).

Code Example (Pseudocode):

byte[] pdfBytes = // PDF document as byte arrayList<byte[]> pngImages = ConvertPdfToPng(pdfBytes);

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>