Skip to content
Back to skills

Pdf Files

ASecurity

Making a PDF with reportlab: register a TTF font first so symbols such as ₹, € and curly quotes render.

  • 763 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 22, 2026
ai-agentspython

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add DuskBotAI/duskbot --skill pdf-files --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pdf Files?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pdf Files
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/duskbotai-pdf-files/badge)](https://www.skillsdirectory.com/skills/duskbotai-pdf-files)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pdf-files
description: "Making a PDF with reportlab: register a TTF font first so symbols such as ₹, € and curly quotes render."
---

# PDF files

reportlab's built-in fonts (Helvetica, Times) have no ₹ and draw it as a black box. Before drawing text, register a TTF
font that has it and use it everywhere:

```python
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
import glob
path = next(iter(glob.glob("/usr/share/fonts/**/DejaVuSans.ttf", recursive=True) + glob.glob("/usr/share/fonts/**/FreeSans.ttf", recursive=True)), None)
if path:
    pdfmetrics.registerFont(TTFont("Body", path))
```

Then use `"Body"` as the font name (and in paragraph styles). Open the finished PDF's text (pdftotext) once to check the
symbols came through before you attach it.

Files in this skill

  • SKILL.md813 B
  • manifest.json235 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.