ai-pdf-builder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

AI PDF Builder

AI PDF Builder

YC-style docs in seconds. AI-powered PDF generator for legal documents, pitch decks, and professional reports.
Generate SAFEs, NDAs, term sheets, whitepapers, and memos from simple prompts. Works with Claude, GPT, Cursor, and AI coding agents. Perfect for:
  • Whitepapers & Litepapers
  • Term Sheets
  • SAFEs & NDAs
  • Memos & Reports
  • Legal Agreements
数秒即可生成YC风格的文档,AI驱动的PDF生成工具,可用于生成法律文档、融资演示文稿和专业报告。
可通过简单的提示词生成SAFE协议、NDA保密协议、投资条款清单、白皮书和备忘录。支持对接Claude、GPT、Cursor和AI编程Agent,非常适合生成以下类型的文档:
  • 白皮书与精简白皮书
  • 投资条款清单
  • SAFE协议与NDA保密协议
  • 备忘录与报告
  • 法律协议

What's New in v1.1.0

v1.1.0版本更新内容

  • AI Content Generation - Generate documents from prompts using Claude
  • --company
    Flag
    - Inject company name directly via CLI
  • enhance
    Command
    - Improve existing content with AI
  • summarize
    Command
    - Generate executive summaries from documents
  • Content Sanitization - Automatic cleanup of AI-generated content
  • AI内容生成 - 可通过Claude基于提示词生成文档
  • --company
    参数
    - 支持通过CLI直接注入公司名称
  • enhance
    命令
    - 借助AI优化现有内容
  • summarize
    命令
    - 为文档生成执行摘要
  • 内容净化 - 自动清理AI生成内容中的冗余内容

Requirements

使用要求

Option A: Local Generation (Free, Unlimited)
bash
undefined
选项A:本地生成(免费、无使用限制)
bash
undefined

macOS

macOS

brew install pandoc brew install --cask basictex sudo tlmgr install collection-fontsrecommended fancyhdr titlesec enumitem xcolor booktabs longtable geometry hyperref graphicx setspace array multirow
brew install pandoc brew install --cask basictex sudo tlmgr install collection-fontsrecommended fancyhdr titlesec enumitem xcolor booktabs longtable geometry hyperref graphicx setspace array multirow

Linux

Linux

sudo apt-get install pandoc texlive-full

**Option B: Cloud API (Coming Soon)**
No install required. Get API key at ai-pdf-builder.com

**For AI Features:**
Set your Anthropic API key:
```bash
export ANTHROPIC_API_KEY="your-key-here"
sudo apt-get install pandoc texlive-full

**选项B:云API(即将上线)**
无需安装任何依赖,可前往ai-pdf-builder.com获取API密钥。

**AI功能使用要求:**
设置你的Anthropic API密钥:
```bash
export ANTHROPIC_API_KEY="your-key-here"

Usage

使用方法

Check System

系统环境检查

bash
npx ai-pdf-builder check
bash
npx ai-pdf-builder check

Generate via CLI

通过CLI生成文档

bash
undefined
bash
undefined

From markdown file

基于Markdown文件生成

npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf
npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf

With company name

携带公司名称生成

npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf --company "Acme Corp"
npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf --company "Acme Corp"

Document types: whitepaper, memo, agreement, termsheet, safe, nda, report, proposal

支持的文档类型:whitepaper(白皮书)、memo(备忘录)、agreement(协议)、termsheet(条款清单)、safe(SAFE协议)、nda(保密协议)、report(报告)、proposal(提案)

undefined
undefined

AI Content Generation (New!)

AI内容生成(新功能!)

bash
undefined
bash
undefined

Generate a whitepaper from a prompt

基于提示词生成白皮书

npx ai-pdf-builder ai whitepaper "Write a whitepaper about decentralized identity" -o identity.pdf
npx ai-pdf-builder ai whitepaper "Write a whitepaper about decentralized identity" -o identity.pdf

Generate with company branding

携带公司品牌信息生成

npx ai-pdf-builder ai whitepaper "AI in healthcare" -o healthcare.pdf --company "HealthTech Inc"
npx ai-pdf-builder ai whitepaper "AI in healthcare" -o healthcare.pdf --company "HealthTech Inc"

Generate other document types

生成其他类型文档

npx ai-pdf-builder ai termsheet "Series A for a fintech startup" -o termsheet.pdf npx ai-pdf-builder ai memo "Q4 strategy update" -o memo.pdf --company "TechCorp"
undefined
npx ai-pdf-builder ai termsheet "Series A for a fintech startup" -o termsheet.pdf npx ai-pdf-builder ai memo "Q4 strategy update" -o memo.pdf --company "TechCorp"
undefined

Enhance Existing Content (New!)

优化现有内容(新功能!)

bash
undefined
bash
undefined

Improve and expand existing markdown

优化并拓展现有Markdown内容

npx ai-pdf-builder enhance ./draft.md -o enhanced.md
npx ai-pdf-builder enhance ./draft.md -o enhanced.md

Enhance and convert to PDF in one step

一步完成内容优化并转换为PDF

npx ai-pdf-builder enhance ./draft.md -o enhanced.pdf --pdf
undefined
npx ai-pdf-builder enhance ./draft.md -o enhanced.pdf --pdf
undefined

Summarize Documents (New!)

生成文档摘要(新功能!)

bash
undefined
bash
undefined

Generate executive summary

生成执行摘要

npx ai-pdf-builder summarize ./long-document.md -o summary.md
npx ai-pdf-builder summarize ./long-document.md -o summary.md

Summarize as PDF

生成PDF格式的摘要

npx ai-pdf-builder summarize ./report.pdf -o summary.pdf --pdf
undefined
npx ai-pdf-builder summarize ./report.pdf -o summary.pdf --pdf
undefined

Generate via Code

通过代码调用

typescript
import { generateWhitepaper, generateTermsheet, generateSAFE, aiGenerate, enhance, summarize } from 'ai-pdf-builder';

// AI-Generated Whitepaper
const aiResult = await aiGenerate('whitepaper', 
  'Write about blockchain scalability solutions',
  { company: 'ScaleChain Labs' }
);

// Whitepaper from content
const result = await generateWhitepaper(
  '# My Whitepaper\n\nContent here...',
  { title: 'Project Name', author: 'Your Name', version: 'v1.0', company: 'Acme Corp' }
);

if (result.success) {
  fs.writeFileSync('whitepaper.pdf', result.buffer);
}

// Enhance existing content
const enhanced = await enhance(existingMarkdown);

// Summarize a document
const summary = await summarize(longDocument);

// Term Sheet with company
const termsheet = await generateTermsheet(
  '# Series Seed Term Sheet\n\n## Investment Amount\n\n$500,000...',
  { title: 'Series Seed', subtitle: 'Your Company Inc.', company: 'Investor LLC' }
);

// SAFE
const safe = await generateSAFE(
  '# Simple Agreement for Future Equity\n\n...',
  { title: 'SAFE Agreement', subtitle: 'Your Company Inc.' }
);
typescript
import { generateWhitepaper, generateTermsheet, generateSAFE, aiGenerate, enhance, summarize } from 'ai-pdf-builder';

// AI生成白皮书
const aiResult = await aiGenerate('whitepaper', 
  'Write about blockchain scalability solutions',
  { company: 'ScaleChain Labs' }
);

// 基于现有内容生成白皮书
const result = await generateWhitepaper(
  '# My Whitepaper\n\nContent here...',
  { title: 'Project Name', author: 'Your Name', version: 'v1.0', company: 'Acme Corp' }
);

if (result.success) {
  fs.writeFileSync('whitepaper.pdf', result.buffer);
}

// 优化现有内容
const enhanced = await enhance(existingMarkdown);

// 生成文档摘要
const summary = await summarize(longDocument);

// 携带公司信息生成投资条款清单
const termsheet = await generateTermsheet(
  '# Series Seed Term Sheet\n\n## Investment Amount\n\n$500,000...',
  { title: 'Series Seed', subtitle: 'Your Company Inc.', company: 'Investor LLC' }
);

// 生成SAFE协议
const safe = await generateSAFE(
  '# Simple Agreement for Future Equity\n\n...',
  { title: 'SAFE Agreement', subtitle: 'Your Company Inc.' }
);

Document Types

支持的文档类型

TypeFunctionBest For
whitepaper
generateWhitepaper()
Technical docs, litepapers
memo
generateMemo()
Executive summaries
agreement
generateAgreement()
Legal contracts
termsheet
generateTermsheet()
Investment terms
safe
generateSAFE()
SAFE agreements
nda
generateNDA()
Non-disclosure agreements
report
generateReport()
Business reports
proposal
generateProposal()
Business proposals
类型对应函数适用场景
whitepaper
generateWhitepaper()
技术文档、精简白皮书
memo
generateMemo()
执行摘要
agreement
generateAgreement()
法律合同
termsheet
generateTermsheet()
投资条款
safe
generateSAFE()
SAFE协议
nda
generateNDA()
保密协议
report
generateReport()
商业报告
proposal
generateProposal()
商业提案

Custom Branding

自定义品牌配置

typescript
const result = await generateWhitepaper(content, metadata, {
  customColors: {
    primary: '#E85D04',    // Signal Orange
    secondary: '#14B8A6',  // Coordinate Teal
    accent: '#0D0D0D'      // Frontier Dark
  },
  fontSize: 11,
  margin: '1in',
  paperSize: 'letter'
});
typescript
const result = await generateWhitepaper(content, metadata, {
  customColors: {
    primary: '#E85D04',    // 主色调:信号橙
    secondary: '#14B8A6',  // 次色调:协调青
    accent: '#0D0D0D'      // 强调色:前沿黑
  },
  fontSize: 11,
  margin: '1in',
  paperSize: 'letter'
});

Agent Instructions

Agent使用说明

When a user asks to generate a PDF:
  1. Check what type of document they need (whitepaper, term sheet, memo, etc.)
  2. Determine if they want AI generation or have existing content
  3. Get the content - either from their message, a file, or use AI to generate
  4. Ask for metadata if not provided (title, author, company name)
  5. Use
    --company
    flag to inject company branding
  6. Check if Pandoc is installed:
    which pandoc
  7. If Pandoc missing, provide install instructions or suggest cloud API
  8. Generate the PDF using the appropriate function
  9. Send the PDF file to the user
AI Commands Quick Reference:
  • ai <type> "<prompt>"
    - Generate new document from prompt
  • enhance <file>
    - Improve existing content
  • summarize <file>
    - Create executive summary
  • --company "Name"
    - Add company branding to any command
当用户要求生成PDF时,请按照以下步骤操作:
  1. 确认用户需要的文档类型(白皮书、条款清单、备忘录等)
  2. 确认用户是需要AI生成内容,还是已有现成内容
  3. 获取内容:可来自用户的消息、上传的文件,或者使用AI生成
  4. 如果用户未提供元数据(标题、作者、公司名称),请向用户询问
  5. 使用
    --company
    参数注入公司品牌信息
  6. 检查是否已安装Pandoc:执行
    which pandoc
  7. 如果未安装Pandoc,提供安装指引,或者建议使用云API
  8. 使用对应的函数生成PDF
  9. 将生成的PDF文件发送给用户
AI命令速查:
  • ai <type> "<prompt>"
    - 基于提示词生成新文档
  • enhance <file>
    - 优化现有内容
  • summarize <file>
    - 生成执行摘要
  • --company "Name"
    - 为任意命令添加公司品牌信息

Links

相关链接