UglyToad / PdfPig

Read and extract text and other content from PDFs in C# (port of PDFBox)
https://github.com/UglyToad/PdfPig/wiki
Apache License 2.0
1.73k stars 241 forks source link

How can I render pdf to image? #280

Closed xtuzy closed 1 year ago

xtuzy commented 3 years ago

Hello, I want render pdf to image and extract text in Xamain. I search pdfbox,then find this library. I use skiasharp in xamarin,and i find PdfBox-Android render pdf use android's canvas, it is similar to SkCanvas in Skiasharp. I want imitation PdfBox-Android to implement render , but I see PdfPig is different from PdfBox. How can I implement this feature? Can you give me a guide?

BobLd commented 3 years ago

Hi @xtuzy, thanks for your question, this is a feature that would be really useful.

I've started working on it in this PR https://github.com/UglyToad/PdfPig/pull/228 but this is far from being finished. This uses System.Drawing but it should be relatively easy to replace it by Skiasharp.

As this is a feature this requested a lot, happy to help you if you want to work on it

(I pinned the issue to avoid duplicates)

Related to https://github.com/UglyToad/PdfPig/issues/223

perplexityjeff commented 3 years ago

This would make for a very nice feature and make the library that much more useful! Thank you for all the work so far.

davebrokit commented 2 years ago

For those that are looking for a solution while this is ongoing:

From the documentation:

If you need this functionality see if docnet meets your requirements.

BobLd commented 9 months ago

I've created a repo/NuGet package to render pdf documents using PdfPig and SkiaSharp here https://github.com/BobLd/PdfPig.Rendering.Skia