No description
Find a file
2025-12-08 15:06:42 +09:00
.github/workflows ci: Fix podofo cache (#8) 2025-12-08 15:06:42 +09:00
examples Add files 2025-12-05 03:38:14 +09:00
lowlevel Add more bindings (#7) 2025-12-08 14:52:03 +09:00
tests Add more bindings (#7) 2025-12-08 14:52:03 +09:00
.gitignore Initial commit 2025-12-05 03:34:52 +09:00
LICENSE Initial commit 2025-12-05 03:34:52 +09:00
podofo.nim Add more bindings (#7) 2025-12-08 14:52:03 +09:00
podofo.nimble Remove unnecessary nimble task (#5) 2025-12-05 15:09:18 +09:00
README.md Update README.md (#6) 2025-12-05 15:37:34 +09:00

nim-podofo

Nim bindings for PoDoFo library.

Requirements

Installtion

nimble install podofo

Usage

import pkg/podofo

# Create a new document
let doc = newPdfDocument()

# Create an A4 page
let page = doc.createPage(PdfPageSize.A4)

# Get a standard font
let font = doc.helvetica()

# Draw on the page
page.draw:
  painter.setFont(font, 12)
  painter.setFillColor(black())
  painter.drawText("Hello, World!", 100, 700)

# Save the document
doc.save("output.pdf")

Build

podofo requires C++ compilation. Use nim cpp.

nim cpp yourfile.nim

Note

Add the following lines to your .nimble

backend = "cpp"

License

MIT