qpdf

Nim bindings for qpdf C++ library

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 0.1.0
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:27

Tags

Authors

  • fox0430

Installation

nimble install qpdf
choosenim install qpdf
git clone https://github.com/fox0430/nim-qpdf

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
qpdf - - - - - - -

Dependencies

Package Version Optional
nim >= 2.0.6 No

Source

Repository https://github.com/fox0430/nim-qpdf
Homepage https://github.com/fox0430/nim-qpdf
Registry Source nimble_official

README

nim-qpdf

Nim bindings for the qpdf C++ library.

Requirements

  • Nim 2.0.6+
  • qpdf 11.0+ (libqpdf-dev)

Installtion

nimble install qpdf

Usage

import pkg/qpdf

# Create new PDF
var pdf = newPdf()

# Basic info
echo "Pages: ", pdf.numPages
echo "Version: ", pdf.version

# Add embedded file
pdf.addEmbeddedFile("data.txt", "content", "text/plain")

# Save
pdf.save("output.pdf")

# Or save to memory
let bytes = pdf.saveToMemory()

Build

nim cpp -r yourfile.nim

[!NOTE] Add the following lines to your .nimble

backend = "cpp"