Files
openclaw/create_pdf.py
Clawd Bot ca9b510922 chore: align with upstream openclaw/openclaw and overlay local additions
- Reset master to upstream/main (16,697 commits)
- Overlay 2,271 local-only files (skills, tools, workspace, configs, apps)
- Restore IDENTITY.md and USER.md templates
- Build verified, gateway running, Discord working

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 07:40:46 +01:00

19 lines
526 B
Python

#!/usr/bin/env python3
# Minimal PDF creator using reportlab
# Saves a single-page PDF with the text 'Hello' to /tmp/test.pdf
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
output_path = '/tmp/test.pdf'
c = canvas.Canvas(output_path, pagesize=A4)
width, height = A4
c.setFont('Helvetica', 40)
text = 'Hello'
# Center text roughly
text_width = c.stringWidth(text, 'Helvetica', 40)
c.drawString((width - text_width) / 2, height / 2, text)
c.showPage()
c.save()
print(f'Wrote PDF to {output_path}')