Skip to content
forked from parallax/jsPDF

Client-side JavaScript PDF generation for everyone.

License

Notifications You must be signed in to change notification settings

TripleTre/jsPDF

 
 

Repository files navigation

png2pdf

A library to convert pngs to DPF. Built on jsPDF with all features removed except png.

usage

import { png2pdf } from "png2pdf";

const pdfBuf = png2pdf({
  pageWidth: 960,
  pageHeight: 720,
  pages: [
    [
        {
          dataUrl: "data:**",
          x: 0,
          y: 0,
          w: 960,
          h: 720
        }
    ], // page 1
    [
      {
        dataUrl: "data:**",
        x: 0,
        y: 0,
        w: 960,
        h: 720
      },
      {
        dataUrl: "data:**",
        x: 10,
        y: 10,
        w: 950,
        h: 710
      }
    ] // page 2
  ]
})

About

Client-side JavaScript PDF generation for everyone.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.2%
  • TypeScript 2.6%
  • HTML 1.2%