2

i got some troubles to display a pdf using pdfium using c#. I read this other question:

Read a stored PDF from memory stream

i downloaded the pdfiumViewer package, but when i compile it, it says that it can't find the pdfium library. So, I downloaded the package "pdfium.net SDK" so it's working but it's not free, it's limited version. what i was wondering is : do we must have the package "pdfium.net SDK" to have the "pdfiumViewer" working" ? thx !

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
Json
  • 153
  • 2
  • 7
  • 17
  • what problem in order to compile the pdfium library yourself? it is not so difficult. Use libraries from patagames pdfium.net sdk is unlikely to succeed. It differ from the original pdfium and have advanced functionality. Working with [interactive forms](http://pdfium.patagames.com/Help/html/30a08af8-ecae-4ebd-902c-46d183ea4dcd.htm) for example. – Andrew Jun 04 '15 at 12:06

3 Answers3

6

The SDK you found, which I guess is Patagames's Pdfium.Net SDK, which is indeed a paid solution.

PdfiumViewer is free, but you have to have pdfium built, which is pretty thoroughly documented.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
5

Pdfium.dll is already integrated into PdfiumViewer. But for it to be loaded, you need when building your project, to copy this file next to your application, either in the root or the x86 or x64 sub directory. The easiest way to accomplish this is by changing the properties of that file, changing the Copy to Output Directory setting to Copy always.

bebeynico
  • 61
  • 1
  • 1
1

Try the NuGet package "PdfiumViewer". Works like a charm! In my case*, I needed the NuGet Package PdfiumViewer.Native.x86.v8-xfa, which adds the needed DLL. Got it running after 10 minutes with this code.

*) Visual Studio 2019 Pro, Windows 10 x64 Pro

Constantin
  • 848
  • 8
  • 23
RebootDeluxe
  • 762
  • 3
  • 16