跳到正文
FunCoding

pandic-office

Convert Markdown to PDF (or DOCX/EPUB/HTML) using the `pandoc` CLI. Use when asked to produce a PDF report, brief, summary, or any document where the input is Markdown and the output should be a polished, paginated file.

Star
1,361
许可证
Apache-2.0
最近提交
2026年10月10日

backend/commonly-bundled-skills/pandic-office/SKILL.md

在 GitHub 上查看

pandic-office — Markdown → PDF / DOCX / EPUB / HTML via pandoc

Pandoc is installed at /usr/bin/pandoc. The XeLaTeX engine (xelatex) is installed for PDF output. Both work non-interactively in the agent workspace.

Common conversions

# Markdown → PDF (default LaTeX engine)
pandoc input.md -o output.pdf --pdf-engine=xelatex

# Markdown → DOCX (Word document)
pandoc input.md -o output.docx

# Markdown → EPUB (e-book)
pandoc input.md -o output.epub

# Markdown → standalone HTML
pandoc input.md -o output.html --standalone

Producing a one-page brief

cat > /workspace/$(basename "$PWD")/brief.md <<'EOF'
# Q1 Engineering Brief

## Highlights
- Shipped feature X
- Closed Y bugs

## Risks
- Z dependency upgrade pending
EOF

pandoc /workspace/$(basename "$PWD")/brief.md \
  -o /workspace/$(basename "$PWD")/brief.pdf \
  --pdf-engine=xelatex \
  -V geometry:margin=1in \
  -V fontsize=11pt

Useful flags

FlagEffect
--tocInsert a table of contents
-V geometry:margin=1inSet page margins
-V fontsize=11ptSet body font size
--number-sectionsAuto-number headings
--metadata title="..."Set document title
-o file.pdfOutput filename + format (inferred from extension)

After producing the file

Attach it to chat using the commonly_attach_file tool (a kernel verb):

commonly_attach_file({
  podId: "<the pod>",
  filePath: "brief.pdf",      // workspace-relative
  message: "Q1 brief attached."
})

The file path must stay inside /workspace/<accountId>/ — .. and absolute paths outside the workspace are rejected.

Troubleshooting

  • "xelatex not found" — pandoc fell back to a missing TeX engine. Always pass --pdf-engine=xelatex.
  • "Could not convert image" — embedded images need to be local file paths inside the workspace, not http URLs (unless you pre-fetch them).
  • Tables render badly in PDF — add --variable=tables:true and use simple Markdown table syntax (no merged cells).

When NOT to use pandic-office

  • For DOCX/XLSX/PPTX with rich layouts → use officecli instead.
  • For PDF manipulation (extract text, merge, split) → use the pdf skill.
  • For converting binary docs → markdown for input → use markdown-converter.

相似的 Skill

精选

pdf

提取文本和表格、合并拆分、填写表单,也能对扫描件做 OCR。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

canvas-design

按设计理念生成海报和视觉作品,输出 PNG 或 PDF。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

docx

创建和编辑 Word 文档,支持目录、页码、页眉等排版。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

doc-coauthoring

按步骤协作撰写技术方案、提案和决策文档,逐轮修改。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

xlsx

读写 Excel 和 CSV,处理公式、格式、图表与数据清洗。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

pptx

生成、读取和修改演示文稿,也能合并拆分幻灯片。

ANanthropics/skills181k近 7 天新增 1,119 个 star