https://github.com/otthe/qr-pdf
Ruby library to generate and add QR codes to PDF documents
https://github.com/otthe/qr-pdf
automation pdf qrcode-generator ruby
Last synced: 7 months ago
JSON representation
Ruby library to generate and add QR codes to PDF documents
- Host: GitHub
- URL: https://github.com/otthe/qr-pdf
- Owner: otthe
- Created: 2024-06-24T12:54:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-24T15:52:33.000Z (over 1 year ago)
- Last Synced: 2025-01-22T08:11:39.272Z (9 months ago)
- Topics: automation, pdf, qrcode-generator, ruby
- Language: Ruby
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QR-PDF
Dynamically generates and adds QR code to one of the four corners of your one page PDF.
Generated PDF will be saved into a new folder with the same name as the input file.## Position options
You can choose which corner the QR code will be placed via following strings:
```
"top-left" || "top-right" || "bottom-left" || "bottom-right"
```## CLI Usage
```
# With default size
ruby qrpdf.rb --url "https://example.com" --corner "bottom-right" --filename "test.pdf" --output "tmp"# With optional size
ruby qrpdf.rb --url "https://example.com" --corner "bottom-right" --filename "test.pdf" --output "tmp" --size 96
```## Library Usage
```
require_relative 'lib/QRPdf'qr_url = "https://example.com"
corner = "top-left"
filename = "test.pdf"
output_folder = "tmp"
size = 96doc = QRPdf::Document.new(
qr_url,
corner,
filename,
output_folder,
size
)doc.execute
```
## Things to consider
* This library only supports one page PDF's for now (although you can easily modify this for your needs)
* No tests currently