Gera PDFs profissionais Microsoft-branded via HTML intermediario + WeasyPrint com CSS Paged Media. Cores do logo ciclam por secao (Red→Green→Blue→Yellow), TOC clicavel, status badges, cover full-bleed. Script batch: sources/scripts/generate_all_pdfs.py. USE FOR: criar PDF, gerar pdf, batch PDF, PDF executivo, PDF com tabelas. DO NOT USE FOR: Word (docx-creator), PowerPoint (pptx-creator), Excel (xlsx-creator), diagramas (figjam-diagrams).
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Gera PDFs profissionais Microsoft-branded via HTML intermediario + WeasyPrint com CSS Paged Media. Cores do logo ciclam por secao (Red→Green→Blue→Yellow), TOC clicavel, status badges, cover full-bleed. Script batch: sources/scripts/generate_all_pdfs.py. USE FOR: criar PDF, gerar pdf, batch PDF, PDF executivo, PDF com tabelas. DO NOT USE FOR: Word (docx-creator), PowerPoint (pptx-creator), Excel (xlsx-creator), diagramas (figjam-diagrams).
PDF Creator
Gera PDFs profissionais Microsoft-branded via pipeline Markdown → HTML + CSS Paged Media → WeasyPrint → PDF.
Tecnologia
Pipeline HTML→PDF via Python 3 + WeasyPrint (substitui reportlab). O script converte markdown para HTML intermediario com CSS Paged Media completo, depois WeasyPrint renderiza para PDF.
# Todos os markdowns ativos
.venv/bin/python3 sources/scripts/generate_all_pdfs.py --force
# Um documento especifico
.venv/bin/python3 sources/scripts/generate_all_pdfs.py --file <slug> --force
# Com HTML intermediario (debug)
.venv/bin/python3 sources/scripts/generate_all_pdfs.py --file <slug> --force --html
# Dry-run
.venv/bin/python3 sources/scripts/generate_all_pdfs.py --dry-run
Branding — Cores Ciclicas do Logo Microsoft
Cada secao H2 recebe a proxima cor do logo, ciclando a cada 4 secoes:
Secao
Cor
Hex
Uso
1, 5, 9...
Vermelho
#F25022
Heading, divider bar, table headers, blockquote border
2, 6, 10...
Verde
#7FBA00
Heading, divider bar, table headers, blockquote border
3, 7, 11...
Azul
#00A4EF
Heading, divider bar, table headers, blockquote border
4, 8, 12...
Amarelo
#FFB900
Heading, divider bar, table headers, blockquote border
Paleta Completa (Microsoft Brand)
Element
Hex
reportlab Color
Use For
Primary Blue
#0078D4
HexColor('#0078D4')
Headers, title bars, section dividers
Red
#F25022
HexColor('#F25022')
Alerts, risks, critical items
Green
#7FBA00
HexColor('#7FBA00')
Success, positive metrics, completed
Blue
#00A4EF
HexColor('#00A4EF')
Info, links, secondary elements
Yellow
#FFB900
HexColor('#FFB900')
Warnings, in-progress, highlights
Dark Green
#107C10
HexColor('#107C10')
Confirmed, healthy status
Red Alert
#E81123
HexColor('#E81123')
Security, blocked, critical
Teal
#008272
HexColor('#008272')
Infrastructure, monitoring
Purple
#5C2D91
HexColor('#5C2D91')
AI, modernization
Orange
#D83B01
HexColor('#D83B01')
Manual actions, human steps
Text Primary
#323130
HexColor('#323130')
Body text
Text Secondary
#605E5C
HexColor('#605E5C')
Captions, metadata, footers
Background Light
#F3F2F1
HexColor('#F3F2F1')
Alternating table rows
Background White
#FFFFFF
colors.white
Page background
Border Gray
#D2D0CE
HexColor('#D2D0CE')
Table borders
4-Color Bar
Every PDF includes the Microsoft 4-color gradient bar on the cover page and as a thin line in the header:
from reportlab.lib.colors import HexColor
defdraw_4color_bar(canvas, x, y, width, height=4):
"""Draw the Microsoft 4-color bar."""
segment = width / 4
bar_colors = [
HexColor('#F25022'), # Red
HexColor('#7FBA00'), # Green
HexColor('#00A4EF'), # Blue
HexColor('#FFB900'), # Yellow
]
for i, color inenumerate(bar_colors):
canvas.setFillColor(color)
canvas.rect(x + i * segment, y, segment, height, fill=1, stroke=0)
Fonts
reportlab includes Helvetica by default. For Microsoft branding, register Segoe UI if available:
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
import os
# Try to register Segoe UI (available on Windows/macOS with Office installed)
segoe_paths = [
'/Library/Fonts/Segoe UI.ttf',
'/System/Library/Fonts/SegoeUI.ttf',
'C:/Windows/Fonts/segoeui.ttf',
]
FONT_NAME = 'Helvetica'# Fallbackfor path in segoe_paths:
if os.path.exists(path):
pdfmetrics.registerFont(TTFont('SegoeUI', path))
FONT_NAME = 'SegoeUI'break