PDFiumCore .NET Wrapper

repository·master·Indexed 41 days ago

https://github.com/dtronix/pdfiumcore

A .NET Standard 2.1 wrapper for the PDFium library providing C# bindings and binaries for Linux-x64, OSX-x64, Win-x64, and Win-x86 platforms.

Tokens
419
Snippets
2
Records
3
Agent score
2%

What's inside PDFiumCore

  1. Install PDFiumCore via NuGet

    master

    The preferred method for using PDFiumCore is through the NuGet package. Using NuGet ensures that all necessary bindings are correctly generated and included in the *.deps.json file for your target environments (Linux-x64, OSX-x64, Win-x64, Win-x86).

    dotnet add package PDFiumCore
  2. Build PDFiumCore manually

    master

    To build the project manually, you must have .NET 6.0 installed. You can execute the CreateBindingsPackage.bat script to automate the process of downloading binaries, extracting libraries, and generating C# bindings using CppSharp.

    The build process performs the following:

    1. Downloads specified files from the bblanchon/pdfium-binaries GitHub API.
    2. Extracts zip and tgz files into the asset/libraries directory.
    3. Parses header files in the pdfium-windows-x64 directory via CppSharp to generate PDFiumCore.cs.
    4. Copies libraries and licenses into the src/PDFiumCore/runtimes directories.
    5. Overrides the existing src/PDFiumCore/PDFiumCore.cs with the newly generated version.
    CreateBindingsPackage.bat
  3. Use PDFiumCoreBindingsGenerator parameters

    master

    When running the PDFiumCoreBindingsGenerator.exe (invoked via the build script), you can provide the following positional parameters:

    IndexParameterDescription
    [0]Release IDA specific GitHub API release ID for bblanchon/pdfium-binaries or latest to determine the version and assets to download.
    [1]Download & GenerateSet to true to download libraries and generate bindings; set to false to only download libraries.
    [2]VersionThe value to set the Version.Revision property to (typically used for patches, e.g., 0).