Giter Club home page Giter Club logo

puppeteer's Introduction

POC - ASP.NET Core / NodeServices/ Puppeteer / Imagemagick / Ghostscript

  • Convert html to pdf
  • Convert pdf to png

To run

cd src
dotnet run

To run in Docker

cd src
docker build -f Dockerfile .

Then run the image as a container using

docker run -d -p 8000:80 puppeteer

pdf2png

Optional page (default = 0) dpi (default 180, range between 1 - 300)

curl -F 'file=@/Users/anarki/test.pdf' https://io-pdf.azurewebsites.net/api/v1/pdf/pdf2png?page=0&dpi=180 > test.png && open test.png

html2pdf

curl -d "{ html: '<h1>header </h1> <p>123</p>' }" -H "Content-Type: application/json" -X POST https://io-pdf.azurewebsites.net/api/v1/pdf/html2pdf > test.pdf && open test.pdf

puppeteer's People

Contributors

thisispaulsmith avatar

Watchers

James Cloos avatar

Forkers

equinor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.