npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ireceipt.pro/js

v1.1.25

Published

Create PDF files or images (JPG, PNG, WEBP) from your HTML template.

Downloads

891

Readme

@ireceipt-pro/js

Create PDF files or images from your HTML template.

npm npm NpmLicense GitHub last commit GitHub release

Examples

More information and examples are available on https://dashboard.ireceipt.pro

| | | | | --- | --- | --- | | Invoice template invoice_for_services_h2lmu9s2 | Invoice template invoice_universal_e2wa2qvy | Invoice template invoice_universal_k5gizy86 |

| | | | --- | --- | | Invoice template invoice_universal_qg1oiing | Invoice template invoice_universal_vzrt6k1s |

Get Started

For the library to work, you will need an API key, which you can get at https://dashboard.ireceipt.pro. You can also find public template IDs there or create your own.

import { IReceiptPRO } from '@ireceipt.pro/js';

const irp = new IReceiptPRO(process.env.IRETAILPRO_API_KEY);

irp.createJpgFromPublicTemplate("invoice_universal_vzrt6k1s", {
  "invoice": {
    "number": "13",
    "date": "2023-10-03",
    "table": {
      "headers": [
        "NAME",
        "PRICE",
        "QTY",
        "AMOUNT"
      ],
      "rows": [
        {
          "values": [
            "Gorgeous Fresh Car",
            "$100.99",
            "6",
            "$605.94"
          ]
        },
        {
          "values": [
            "Incredible Rubber Bike",
            "$356.00",
            "1",
            "$356.00"
          ]
        },
        {
          "values": [
            "UX Services",
            "$100.00",
            "2",
            "$200.00"
          ]
        },
        {
          "values": [
            "Development Service",
            "$2000.00",
            "1",
            "$2000.00"
          ]
        }
      ]
    },
    "total": "$3161.94",
    "terms": [
      "Payment is due within 5 days",
      "Payment method CARD",
      "Card Details:",
      "Card Number: 4242-4242-4242-4242",
      "Sergey Dudko"
    ]
  },
  "from": {
    "companyName": "IReceipt PRO",
    "lines": [
      "Identification Number: 55891434",
      "911 Reece Freeway",
      "32390 Kraig Station",
      "East Rhea",
      "IR",
      "[email protected]"
    ]
  },
  "to": {
    "companyName": "Morissette - Bogisich",
    "lines": [
      "969 Harber Expressway",
      "South Aishaton",
      "GB"
    ]
  },
  "localization": {
    "invoice": "INVOICE",
    "bill_to": "BILL TO",
    "date": "DATE",
    "total": "Total",
    "terms_and_conditions": "TERMS & CONDITIONS"
  }
}, {
  "width": 796,
  "height": 1126
})

Use

Available methods for generating PDF files and JPG, PNG, WEBP images from public or your personal templates:

| method | description | | --- | --- | | createJpgFromPublicTemplate | Create JPG Image from public template | | createPdfFromPublicTemplate | Create PDF File from public template | | createPngFromPublicTemplate | Create PNG Image from public template | | createWebpFromPublicTemplate | Create WEBP Image from public template | | createJpgFromPrivateTemplate | Create JPG Image from private template | | createPdfFromPrivateTemplate | Create PDF File from private template | | createPngFromPrivateTemplate | Create PNG Image from private template | | createWebpFromPrivateTemplate | Create WEBP Image from private template |

All methods have the same arguments, for example:

const buffer: Buffer | ArrayBuffer = await createJpgFromPublicTemplate(templateId, args, size);

| argument | description | required | example | | --- | --- | --- | --- | | templateId | template id, you can find it on https://dashboard.ireceipt.pro | true | gift_card_template_1 | | args | arguments for substitution in the template | true | {"amount": "$25","name": "Gift Card","code": "#1234567890","color": "#ebfdff"} | | size | the size of the file being created | false | {"width": 796,"height": 1126} |

Project outline

The scheme of work looks like this: IReceipt PRO Flow

LICENSE

MIT