GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Codeuctivity/PdfjsSharp: Brings Pdfjs to .net

BranchesTags
Open more actions menu

Latest commit

 

History

293 Commits
293 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
PdfJsSharp
PdfJsSharp
 
 
PdfJsSharpTests
PdfJsSharpTests
 
 
signatures/version1
signatures/version1
 
 
.editorconfig
.editorconfig
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
PdfjsSharp.sln
PdfjsSharp.sln
 
 
README.md
README.md
 
 
cla.md
cla.md
 
 
package-lock.json
package-lock.json
 
 
testenvironments.json
testenvironments.json
 
 

Repository files navigation

PDFjsSharp

Nuget Build Donate

Brings PDF.js to .net

Feature

  • Renders each page of a PDF to PNGs

Dependencies

get

  • NodeJs
    • node 20 or 22 x64 (older node versions are supported by older PDFjsSharp versions)

HowTo use

  • Install nuget package PdfjsSharp
using var rasterizer = new Rasterizer();
var actualImages = await rasterizer.ConvertToPngAsync(@"../../../SourceTest.pdf", actualImagePath);
Assert.Equal(1, actualImages.Count);

Development

get .net 8 sdk

Upgrade npm packages

  • npx npm-check --update-all --skip-unused

Steps to update node_modules.win.*.zip

 cd .\PdfjsSharp\
 nvm install 22;nvm use 22;rm -R .\node_modules\;npm install --omit=dev;rm .\node_modules.win.node22.zip;Compress-Archive -LiteralPath .\node_modules\ -DestinationPath .\node_modules.win.node22.zip;Compress-Archive -Update .\Rasterize.mjs .\node_modules.win.node22.zip

Ubuntu 22.04

#In case you have no nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash 
exit
nvm install 22
sudo apt install dotnet8 zip

Steps to update node_modules.linux.node*.zip

nvm install 22
nvm use 22
rm -R ./node_modules/ 
npm install --omit=dev && rm node_modules.linux.node22.zip && zip -r node_modules.linux.node22.zip node_modules && zip -g node_modules.linux.node22.zip Rasterize.mjs

About

Brings Pdfjs to .net

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

4 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.