node-example helps you turn JSON data into business PDFs. It uses the Kagyz API and includes Node.js examples for common document types like invoices, receipts, quotes, credit notes, and packing slips.
Use this project if you want to:
- create PDF documents from structured data
- work with Arabic text and right-to-left layout
- make invoices, receipts, quotes, and other business forms
- test PDF output from sample JSON files
Before you start, make sure you have:
- a Windows PC
- a web browser
- access to the project page
- Node.js installed if you want to run the examples locally
If you only want to download the project files and review them, a browser is enough.
Go to the project page here:
https://github.com/offputting-headfish447/node-example
From that page, use the download or clone option to get the files onto your Windows computer.
After the files are on your PC:
- Open the folder you downloaded.
- Look for the example files and JSON samples.
- Open the project in your file browser or code editor.
- Follow the example data for the document type you want to create.
If you plan to run the examples on Windows, install Node.js first, then open the project folder in a command window and run the sample commands.
This repository shows how to send JSON data to the Kagyz API and create a PDF document. It is useful for simple business workflows where you already have data in a structured format.
The examples cover:
- invoices
- receipts
- quotes
- credit notes
- packing slips
The project also helps with layouts that need Arabic text support and RTL formatting.
Inside the project, you may find:
.jsonfiles with sample data.jsfiles with example code- PDF output files
- folder names for each document type
- configuration files for Node.js
These files work together to show how data becomes a finished PDF.
If you want to run the examples on Windows, use this flow:
- Install Node.js if it is not already on your computer.
- Download the repository from the project page.
- Save the files in a folder you can find later.
- Open Command Prompt or PowerShell in that folder.
- Run the example script for the document type you want.
A typical flow looks like this:
- open the sample JSON file
- update the data with your own details
- run the script
- check the generated PDF in the output folder
Use this for customer billing. The invoice example usually includes:
- seller name
- buyer name
- item list
- tax lines
- totals
Use this after a payment. The receipt example often includes:
- payment date
- amount paid
- payment method
- reference number
Use this before a sale is confirmed. The quote example usually includes:
- quoted price
- validity date
- item list
- terms
Use this when you need to return money or correct an invoice. The credit note example often includes:
- original invoice number
- refunded items
- adjustment amount
Use this for shipping. The packing slip example usually includes:
- shipment details
- item counts
- package notes
- delivery reference
This project includes topics for Arabic language and right-to-left layout. That makes it useful if your documents need to read from right to left.
You can use it for:
- Arabic invoices
- Arabic receipts
- mixed-language business documents
- layouts that need RTL alignment
When you work with Arabic content, make sure your JSON data uses the correct text and field order for the document you want.
The project follows a simple pattern:
- Prepare your JSON data.
- Choose the document example.
- Send the data through the Kagyz API.
- Generate the PDF.
- Open the PDF and check the result.
This structure makes it easier to reuse the same process for different business forms.
When you edit the sample JSON files, keep the data clear and complete.
Good fields to include:
- company name
- customer name
- document number
- date
- item names
- prices
- tax amount
- total amount
If your document needs Arabic text or RTL formatting, keep the text consistent across all fields.
Use this simple path if you want to get started fast:
- Visit the project page: https://github.com/offputting-headfish447/node-example
- Download the project files to your Windows PC.
- Open the folder after the download finishes.
- Find the example that matches your document type.
- Edit the sample JSON with your own data.
- Run the Node.js example.
- Open the generated PDF file.
If the PDF does not look right, check these items:
- the JSON data is valid
- the document type matches your script
- file paths point to the right folder
- the output folder exists
- the Arabic or RTL text is entered in the right format
If the output is blank or incomplete, review the sample data first.
This repository fits common business tasks such as:
- sending customer invoices
- printing receipts after payment
- sharing quotes before a job starts
- creating credit notes for refunds
- preparing packing slips for shipping
It also works well for teams that want repeatable PDF output from the same data format.
This repository covers these areas:
- api
- arabic-language
- invoice
- invoice-generator
- json-to-pdf
- nodejs
- pdf-generation
- receipt
- rtl
Visit this page to download the project files:
https://github.com/offputting-headfish447/node-example
After you download it, open the folder on Windows and use the example that matches your document type