VOOZH about

URL: https://www.nuget.org/packages/PdfPig.Rendering.Skia/

⇱ NuGet Gallery | PdfPig.Rendering.Skia 0.1.14.2




👁 Image
PdfPig.Rendering.Skia 0.1.14.2

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package PdfPig.Rendering.Skia --version 0.1.14.2
 
 
NuGet\Install-Package PdfPig.Rendering.Skia -Version 0.1.14.2
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PdfPig.Rendering.Skia" Version="0.1.14.2" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PdfPig.Rendering.Skia" Version="0.1.14.2" />
 
Directory.Packages.props
<PackageReference Include="PdfPig.Rendering.Skia" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PdfPig.Rendering.Skia --version 0.1.14.2
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PdfPig.Rendering.Skia, 0.1.14.2"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PdfPig.Rendering.Skia@0.1.14.2
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PdfPig.Rendering.Skia&version=0.1.14.2
 
Install as a Cake Addin
#tool nuget:?package=PdfPig.Rendering.Skia&version=0.1.14.2
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

PdfPig.Rendering.Skia

Cross-platform library to render pdf documents as images with PdfPig using SkiaSharp, or to extract images contained in a pdf page as SkiaSharp images.

This is a very early version and the code is constantly evolving.

Available as a Nuget package https://www.nuget.org/packages/PdfPig.Rendering.Skia/

Uses parts of PDFBox code.

How to Render pages as images

Save pages as image to disk

using UglyToad.PdfPig.Graphics.Colors;
using UglyToad.PdfPig;
using UglyToad.PdfPig.Rendering.Skia;
using SkiaSharp;

[...]

using (var document = PdfDocument.Open(_path, SkiaRenderingParsingOptions.Instance))
{
	string fileName = Path.GetFileName(_path);

	document.AddSkiaPageFactory(); // Same as document.AddPageFactory<SKPicture, SkiaPageFactory>() and document.AddPageFactory<PdfPageSize, PageSizeFactory>()

	for (int p = 1; p <= document.NumberOfPages; p++)
	{
		using (var fs = new FileStream($"{fileName}_{p}.png", FileMode.Create))
		using (var ms = document.GetPageAsPng(p, _scale, RGBColor.White))
		{
			ms.WriteTo(fs);
		}
	}
}

Get the SKBitmap from a page

using UglyToad.PdfPig.Graphics.Colors;
using UglyToad.PdfPig;
using UglyToad.PdfPig.Rendering.Skia;
using SkiaSharp;

[...]

using (var document = PdfDocument.Open(_path, SkiaRenderingParsingOptions.Instance))
{
	document.AddSkiaPageFactory(); // Same as document.AddPageFactory<SKPicture, SkiaPageFactory>() and document.AddPageFactory<PdfPageSize, PageSizeFactory>()

	for (int p = 1; p <= document.NumberOfPages; p++)
	{
		using var skBitmap = document.GetPageAsSKBitmap(p, _scale, RGBColor.White);
		// Use the SKBitmap
	}
}

Get the SKPicture from a page

Starting from version 0.1.14.1, the SKPicture.CullRect cannot be used anymore to get the page size.

using UglyToad.PdfPig.Graphics.Colors;
using UglyToad.PdfPig;
using UglyToad.PdfPig.Rendering.Skia;
using SkiaSharp;

[...]

using (var document = PdfDocument.Open(_path, SkiaRenderingParsingOptions.Instance))
{
	document.AddSkiaPageFactory(); // Same as document.AddPageFactory<SKPicture, SkiaPageFactory>() and document.AddPageFactory<PdfPageSize, PageSizeFactory>()

	for (int p = 1; p <= document.NumberOfPages; p++)
	{
		using var skPicture = document.GetPage<SKPicture>(p);
		// Use the SKPicture
	}
}

How to extract images contained in a pdf page

using UglyToad.PdfPig.Rendering.Skia.Helpers;

[...]

using (var document = PdfDocument.Open(_path, SkiaRenderingParsingOptions.Instance))
{
	for (int p = 1; p <= document.NumberOfPages; p++)
	{
		var page = document.GetPage(p);
		foreach (var pdfImage in page.GetImages())
		{
			using var skBitmap = pdfImage.GetSKBitmap();			
			// Use SKBitmap

			// In order to get the SKImage, use the following:
			using var skImage = SKImage.FromBitmap(skBitmap);
			// Use SKImage
		}
	}
}
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 is compatible.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 is compatible.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on PdfPig.Rendering.Skia:

Package Downloads
OBaseConverter

OBase Framework - Cross-platform PDF converter with OCR, AI vision, structure detection, and chunking

RAG.Parsers.Pdf

Helper library that let you generate Word document based on markdown files.

RailReader.Renderer.PdfPigSkia

Pure-managed rasterisation for Lite/web/mobile consumers. Implements IPdfService and IPdfServiceFactory by composing RailReader.Core.PdfPig (parsing) with PdfPig.Rendering.Skia (rendering via SkiaSharp). Mirrors RailReader.Renderer.Skia's shape but never loads PDFium.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on PdfPig.Rendering.Skia:

Repository Stars
CalyPdf/CalyPdf
Cross-platform Pdf Reader Application
Version Downloads Last Updated
0.1.15.1-alpha016 55 6/16/2026
0.1.15.1-alpha015 73 6/13/2026
0.1.15.1-alpha013 96 6/9/2026
0.1.15.1-alpha012 94 6/8/2026
0.1.15.1-alpha011 99 6/6/2026
0.1.15.1-alpha010 134 5/23/2026
0.1.15.1-alpha009 93 5/22/2026
0.1.15.1-alpha008 113 5/17/2026
0.1.15.1-alpha007 91 5/17/2026
0.1.15.1-alpha006 99 5/17/2026
0.1.15.1-alpha005 87 5/17/2026
0.1.15.1-alpha004 90 5/17/2026
0.1.15.1-alpha003 126 5/4/2026
0.1.15.1-alpha002 101 5/2/2026
0.1.15.1-alpha001 109 4/28/2026
0.1.14.2 20,055 3/30/2026
0.1.14.1 2,140 3/23/2026
0.1.14.1-alpha007 121 3/16/2026
0.1.14.1-alpha006 107 3/15/2026
0.1.14.1-alpha005 645 3/10/2026
Loading failed