PdfPig icon indicating copy to clipboard operation
PdfPig copied to clipboard

How can I render pdf to image?

Open xtuzy opened this issue 4 years ago • 3 comments

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?

xtuzy avatar Feb 07 '21 01:02 xtuzy

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

BobLd avatar Feb 07 '21 09:02 BobLd

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

perplexityjeff avatar Apr 07 '21 11:04 perplexityjeff

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.

davebrokit avatar Jan 04 '22 15:01 davebrokit

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

BobLd avatar Feb 18 '24 17:02 BobLd