Skip to content
プロジェクト

概要

A .NET library for rendering PDF files as images.

デザイン・メディア

この数値の測り方

計測したスター増加

24時間
0
7日間
+3
15日間
+4
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

PDFtoImage Logo PDFtoImage

GitHub Workflow Build Status GitHub Workflow Test Runs Succeeded SonarCloud Quality Gate NuGet version NuGet downloads Website GitHub license

A .NET library for rendering PDF files as images.

PDFtoImage uses PDFium for rendering and SkiaSharp for images.

Getting started

Render the first page of a PDF as PNG with PDFtoImage.Conversion:

using var pdf = File.OpenRead("document.pdf");

PDFtoImage.Conversion.SavePng(
    imageFilename: "page1.png",
    pdfStream: pdf,
    page: 0);

SaveJpeg, SavePng, SaveWebp, and ToImage render a single page. ToImages and ToImagesAsync render multiple pages.

Dispose returned SKBitmap instances after use. To save one, use SKBitmap.Encode.

Unity project installation

  1. Open your project and navigate to Window → Package Management → Package Manager.
  2. Click on the + button (top-left corner) and select Install package from git URL....
  3. Enter the following URL and confirm with the Install button:
https://github.com/sungaila/PDFtoImage.git?path=etc/UnityPackage

Supported runtimes

Tested and supported frameworks

Parallel rendering

PDFium is not thread-safe, so PDFtoImage serializes PDFium calls within each process. For parallel rendering on .NET 11 or later, use PDFtoImage.Parallel. It runs PDFium in separate worker processes; see the Parallel README for examples.

Index and Range for .NET Framework

PolySharp provides System.Index and System.Range for .NET Framework projects. It also exposes the following generated types; avoid using them directly:

  • System.Index
  • System.Range
  • System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute
  • System.Diagnostics.CodeAnalysis.NotNullWhenAttribute
  • System.Runtime.CompilerServices.IsExternalInit

関連プロジェクトを探す

読み込み中…