pandoc-pdf-error-resolution
하는 일
이 스킬은 메시지가 불분명할 때 pandoc PDF 변환 오류를 해결하는 체계적인 방법입니다. 문서를 PDF로 바꾸는데 알 수 없는 오류 메시지가 나오는 사람에게 맞습니다.
사용하는 경우
- ✓PDF 변환 중 pandoc이 알 수 없는 오류를 낼 때.
- ✓같은 문서가 HTML이나 Markdown으로는 변환되지만 PDF로는 안 될 때.
- ✓이 컴퓨터에서 어떤 PDF 엔진이 작동하는지 알아야 하는 경우.
스킬 링크
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pandoc-pdf-error-resolution/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“pandoc이 문서를 PDF로 바꾸지 못하고 알 수 없는 오류(unknown error)라고만 합니다. 작동하는 PDF 엔진을 찾아 PDF를 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 pandoc 버전을 확인하고, pdflatex, xelatex, lualatex, wkhtmltopdf를 찾고, 특정 엔진으로 변환을 재시도한 뒤, 오류를 읽고 무엇을 바꿀지 정합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Pandoc PDF Error Resolution
This skill provides a step-by-step workflow for diagnosing and resolving "unknown error" messages when using pandoc to generate PDFs.
When to Use
Use this skill when:
- Pandoc returns an "unknown error" during PDF conversion
- The conversion succeeds for other formats (e.g., markdown, HTML) but fails for PDF
- You need to identify which PDF engine is available and working
Step-by-Step Procedure
Step 1: Verify Pandoc Installation
First, confirm pandoc is installed and check its version:
pandoc --version
This confirms pandoc is available and shows the version number. Note that pandoc itself doesn't generate PDFs directly—it delegates to external PDF engines.
Step 2: Check Available PDF Engines
Identify which PDF engines are installed on the system:
which pdflatex xelatex lualatex wkhtmltopdf pdfroff 2>/dev/null || echo "Checking individual engines..."
which pdflatex
which xelatex
which lualatex
which wkhtmltopdf
Common engines and their characteristics:
- pdflatex: Fast, widely available, good for basic documents
- xelatex: Better Unicode/font support, recommended for complex documents
- lualatex: Advanced typography, Lua scripting support
- wkhtmltopdf: HTML-to-PDF conversion, good for web-style documents
Step 3: Attempt Conversion with Explicit Engine
Retry the conversion with an explicit --pdf-engine flag:
pandoc input.md -o output.pdf --pdf-engine=xelatex
Try engines in this order:
xelatex(best Unicode support)pdflatex(most widely available)lualatex(if xelatex fails)wkhtmltopdf(for HTML-heavy content)
Step 4: Capture Full stderr Output
Always capture the complete error output before falling back:
pandoc input.md -o output.pdf --pdf-engine=xelatex 2>&1 | tee pandoc_error.log
This preserves the full error message for analysis. Common error patterns:
- Font errors: Missing LaTeX packages or fonts
- Package errors: Missing LaTeX packages (use
tlmgr install <package>) - Syntax errors: Issues in the source document
Step 5: Install Missing Dependencies (if needed)
If errors indicate missing LaTeX packages:
# For TeX Live
tlmgr install <package-name>
# For Debian/Ubuntu
apt-get install texlive-latex-extra texlive-fonts-recommended
# For macOS with Homebrew
brew install --cask mactex
Step 6: Fallback Strategies
If all engines fail, consider:
- Convert to HTML first, then use wkhtmltopdf
- Simplify the document (remove complex formatting)
- Use an online conversion service
- Generate PDF from a different format (e.g., DOCX via LibreOffice)
Example Complete Workflow
#!/bin/bash
# pandoc-pdf-debug.sh
INPUT_FILE="$1"
OUTPUT_FILE="${INPUT_FILE%.md}.pdf"
echo "=== Pandoc PDF Conversion Debug ==="
echo "Input: $INPUT_FILE"
echo "Output: $OUTPUT_FILE"
# Step 1: Verify pandoc
echo -e "\n[1] Checking pandoc version..."
pandoc --version | head -1
# Step 2: Check engines
echo -e "\n[2] Checking available PDF engines..."
for engine in pdflatex xelatex lualatex wkhtmltopdf; do
if which "$engine" &>/dev/null; then
echo " ✓ $engine: $(which $engine)"
else
echo " ✗ $engine: not found"
fi
done
# Step 3: Try conversion with xelatex
echo -e "\n[3] Attempting conversion with xelatex..."
pandoc "$INPUT_FILE" -o "$OUTPUT_FILE" --pdf-engine=xelatex 2>&1 | tee /tmp/pandoc_error.log
if [ $? -eq 0 ]; then
echo "✓ Conversion successful!"
else
echo "✗ Conversion failed. Check /tmp/pandoc_error.log for details"
echo "Attempting fallback with pdflatex..."
pandoc "$INPUT_FILE" -o "$OUTPUT_FILE" --pdf-engine=pdflatex 2>&1
fi
Quick Reference
| Command | Purpose |
|---|---|
pandoc --version |
Verify pandoc installation |
which xelatex |
Check if xelatex engine exists |
pandoc file.md -o file.pdf --pdf-engine=xelatex |
Convert with explicit engine |
... 2>&1 | tee error.log |
Capture full stderr output |
tlmgr install <pkg> |
Install missing LaTeX package |
자주 묻는 질문
pandoc이 혼자서 PDF를 만드나요?
아닙니다. 가이드는 pandoc이 작업을 외부 PDF 엔진에 넘긴다고 설명합니다.
다른 형식을 왜 확인하나요?
다른 형식이 작동하면 문제는 문서보다 PDF 엔진에 있을 가능성이 크기 때문입니다.
유니코드에는 어떤 엔진이 더 좋은가요?
가이드는 xelatex가 pdflatex보다 유니코드와 글꼴 지원이 좋다고 설명합니다.
상세 정보
인기도
- GitHub 스타
- 7.8k
- 순위
- #12905
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
agentpilot
7.8k작업을 준비하고 AgentPilot 루프를 실행해 변경을 제안, 테스트, 점수화하면서 프로젝트를 단계적으로 개선하도록 돕습니다.
openspace
7.8k에이전트 스킬을 저장하고 가져오는 도구인 OpenSpace를 설정하고, MCP를 통해 AI 앱에 연결하도록 돕습니다.
rsi-arena
7.8kAIME나 Terminal-Bench 같은 표준 AI 벤치마크 테스트를 설정하고 실행해 서로 다른 개선 방법을 비교하도록 돕습니다.
experiment-guide
7.8k프로그램을 개선하는 방법을 조사하면서 작은 실험을 계획하고, 결과를 읽고, 발견 사항을 기록하도록 돕습니다.
비슷한 스킬
feishu-doc
394k에이전트가 문서 도구를 사용해 텍스트, 이미지, 표를 포함한 Feishu 클라우드 문서를 읽고, 만들고, 편집하도록 돕습니다.
feishu-drive
394k에이전트가 봇과 공유된 Feishu 클라우드 폴더의 파일을 찾아보고, 정리하고, 댓글을 달도록 돕습니다.
feishu-perm
394k에이전트가 요청을 충족하는 가장 작은 권한을 골라, Feishu 파일에 누가 접근할 수 있는지 확인하고 바꾸도록 돕습니다.