전자책 PDF 변환 API - 전문적인 북 PDF 생성

서적 콘텐츠를 우아한 타이포그래피, 자동 페이지 번호, 목차 및 150개 이상의 커스터마이징 옵션으로 전문적으로 포맷된 PDF로 변환합니다.

무엇을 할 수 있나요?
전문 북 PDF

소설, 원고, 다중 챕터 콘텐츠를 우아한 타이포그래피와 자동 페이지 번호로 인쇄 준비된 PDF로 변환합니다.

프로덕션 품질

고품질 A4/A5/Letter 출력. 표지, 주석 페이지, 목차, 저작권 페이지 포함. 최대 500페이지 지원.

150+ 커스터마이징 옵션

글꼴, 간격, 여백, 색상 및 레이아웃을 제어합니다. 여백은 글꼴 크기에 따라 자동 조정됩니다.

99.9 % 가동 시간
4585.9ms 응답
5 req/s
2 크레딧 / 요청

Convert to PDF

POST https://api.yeb.to/v1/ebooks/pdf/convert-from-file
매개변수 유형 필수 설명
api_key string Yes Your API authentication key (send in Authorization header or as parameter)
file_url string Yes Public URL to JSON file containing book data (metadata, chapters, options)
Why file URL? POST request size limits can truncate large book content. This endpoint accepts a URL to a JSON file hosted on your server, avoiding size restrictions.

JSON File Structure

Your JSON file at file_url should contain:

매개변수 유형 필수 설명
template string Yes Template name: elegant-novel
metadata object Yes Book metadata (title, author, etc.)
metadata.title string Yes Book title
metadata.author string Yes Author name
metadata.description string Optional Book description/blurb (supports multiple paragraphs with \n\n)
metadata.year integer Optional Publication year (default: current year)
metadata.publisher string Optional Publisher name
metadata.isbn string Optional ISBN number
metadata.series string Optional Book series name (shown on cover)
metadata.subtitle string Optional Book subtitle (shown on cover)
metadata.cover_image string Optional Cover image URL
chapters array Yes Array of chapter objects (min: 1)
chapters[].title string Yes Chapter title
chapters[].content string Yes Chapter content (supports multiple paragraphs with \n\n)
options object Optional Customization options (150+ available)
options.format string Optional A4 | A5 | Letter (default: A4)
options.chapter_content_font_size string Optional Font size (e.g., "12pt", "16pt") - margins auto-adjust (default: 12pt)
options.chapter_content_line_height string Optional Line height (e.g., "1.6", "1.8") (default: 1.6)
options.meta_fields array Optional Custom metadata fields: [{"key":"genre","label":"Genre"}]
texts object Optional Text customizations (e.g., copyright_text, publisher_text)

JSON File Example

1. Create book.json file on your server:
{
  "template": "elegant-novel",
  "metadata": {
    "title": "The Great Gatsby",
    "author": "F. Scott Fitzgerald",
    "subtitle": "A Novel of the Jazz Age",
    "series": "American Classics",
    "description": "A story of decadence and excess...\n\nSet in the summer of 1922...",
    "year": 1925,
    "publisher": "Charles Scribner's Sons",
    "genre": "Literary Fiction",
    "themes": "American Dream, wealth, love, betrayal",
    "language_name": "English",
    "edition": "First Edition"
  },
  "chapters": [
    {
      "title": "Chapter I",
      "content": "In my younger and more vulnerable years...\n\nAnd, after boasting this way..."
    },
    {
      "title": "Chapter II",
      "content": "About half way between West Egg and New York..."
    }
  ],
  "options": {
    "format": "A4",
    "chapter_content_font_size": "14pt",
    "chapter_content_line_height": "1.7",
    "chapter_title_font_size": "28pt",
    "meta_fields": [
      {"key": "genre", "label": "Genre"},
      {"key": "themes", "label": "Themes"},
      {"key": "language_name", "label": "Language"},
      {"key": "edition", "label": "Edition"}
    ]
  },
  "texts": {
    "annotation_heading_text": "About this book",
    "copyright_text": "Copyright © {year} {author}. All rights reserved.",
    "publisher_text": "Published by {publisher}"
  }
}
2. Upload to your server (e.g., https://yourdomain.com/books/book.json)
3. Call API with file_url:

Integration Examples

curl -X POST https://api.yeb.to/v1/ebooks/pdf/convert-from-file \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_url": "https://yourdomain.com/books/book.json"}'
const response = await fetch('https://api.yeb.to/v1/ebooks/pdf/convert-from-file', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    file_url: 'https://yourdomain.com/books/book.json'
  })
});
const result = await response.json();
console.log(result.pdf_url);
$response = Http::withHeaders([
    'Authorization' => 'Bearer YOUR_API_KEY'
])->post('https://api.yeb.to/v1/ebooks/pdf/convert-from-file', [
    'file_url' => 'https://yourdomain.com/books/book.json'
]);
$pdf_url = $response->json()['pdf_url'];
import requests

headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "file_url": "https://yourdomain.com/books/book.json"
}
r = requests.post('https://api.yeb.to/v1/ebooks/pdf/convert-from-file', json=payload, headers=headers)
print(r.json()['pdf_url'])

Response Examples

{
  "success": true,
  "pdf_url": "https://yeb.to/storage/ebooks/ebook_abc123.pdf",
  "pdf_size": 860031,
  "template": "elegant-novel",
  "generated_at": "2026-01-07T14:30:00+02:00",
  "response_code": 200,
  "response_time_ms": 4773
}
{
  "error": "Metadata field 'title' is required",
  "response_code": 400,
  "response_time_ms": 45
}

응답 코드

코드설명
200 Success요청 처리 완료.
400 Bad Request입력 유효성 검사 실패.
401 UnauthorizedAPI 키 누락 또는 오류.
403 Forbidden키 비활성 또는 허용되지 않음.
429 Rate Limit요청이 너무 많습니다.
500 Server Error예기치 않은 오류.
Customization

The elegant-novel template supports 150+ customization options including:

  • Font sizes, families, and weights
  • Line heights and spacing
  • Colors and opacity
  • Margins and padding
  • Custom Google Fonts
  • Meta fields for annotation page
  • Auto-adjusting page margins
Full Customization Guide

ebooks/pdf/convert-from-file

ebooks/pdf/convert-from-file 2.0000 credits

Parameters

API Key
header · string · required
File URL
body · string · required

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

전자책 PDF 변환 API - 전문적인 북 PDF 생성 — Practical Guide

A hands-on guide to 전자책 PDF 변환 API - 전문적인 북 PDF 생성: converting book content into professional PDFs with customizable typography, automatic page numbering, table of contents, and elegant formatting. Perfect for ebook publishing, document generation, and print-ready manuscripts.

#What Ebooks to PDF solves

Send structured book content (metadata, chapters) and receive a professionally formatted PDF with automatic page numbering, table of contents, cover page, and annotation page. Ideal for self-publishing, manuscript generation, print-on-demand, and document archival. Supports 150+ customization options including fonts, spacing, margins that auto-adjust based on font size.

#Endpoint & when to use it

#POST https://api.yeb.to/v1/ebooks/pdf/convert-from-file

  • Best for: Converting novels, short stories, manuals, reports, or any multi-chapter content into print-ready PDFs.
  • How it works: We render your content using the elegant-novel template with Blade + Puppeteer/Chromium for pixel-perfect output.
  • Output format: High-quality A4/A5/Letter PDFs with professional typography and automatic layout.
  • Processing time: ~2-5 seconds depending on content length and customization complexity.

#Quick start

Step 1: Create a JSON file with your book data and upload it to a public URL

# book.json (minimal example)
{
  "template": "elegant-novel",
  "metadata": {
    "title": "The Great Gatsby",
    "author": "F. Scott Fitzgerald"
  },
  "chapters": [
    {
      "title": "Chapter I",
      "content": "In my younger and more vulnerable years..."
    }
  ]
}

Step 2: Call the API with the file URL

curl -X POST "https://api.yeb.to/v1/ebooks/pdf/convert-from-file" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_url": "https://yourdomain.com/books/book.json"}'
Why file_url? Large books can exceed POST size limits. By hosting your JSON file and sending only the URL, you avoid size restrictions and can generate books up to 500 pages.

#Parameters that actually matter

ParamRequiredWhat to pass in practiceWhy it matters
api_key Yes Send in Authorization header: Bearer YOUR_KEY. Never expose in frontend code. Auth & credit tracking.
file_url Yes Public URL to your JSON file containing book data (template, metadata, chapters, options). Avoids POST size limits for large books.

#JSON file structure

Your JSON file at file_url must contain:

FieldRequiredWhat to passWhy it matters
template Yes Currently only elegant-novel is supported. Determines the PDF layout style.
metadata Yes Object with title and author at minimum. Can include description, year, publisher, etc. Populates cover page and document properties.
chapters Yes Array of objects, each with title and content. Minimum 1 chapter required. The actual book content to render.
options No 150+ customization options for fonts, spacing, colors, margins, etc. Fine-tune typography and layout.
texts No Override default text labels (e.g., copyright notice, publisher text). Localization and branding.

#Key metadata fields

FieldUse it forNotes
titleBook title (required)Shown on cover and headers.
authorAuthor name (required)Shown on cover and headers.
descriptionBook blurb/synopsisAppears on annotation page. Use \n\n for multiple paragraphs.
subtitleBook subtitleOptional subtitle on cover page.
seriesSeries nameShown on cover above title.
yearPublication yearDefaults to current year if omitted.
publisherPublisher nameShown on cover footer and copyright page.
isbnISBN numberOptional, shown on copyright page.
cover_imageCover illustration URLImage displayed on cover page.
Custom fieldsGenre, themes, etc.Add any custom fields; use options.meta_fields to display them.

#Chapter formatting

Each chapter object requires:

  • title — The chapter heading (e.g., "Chapter I", "Prologue").
  • content — The chapter text. Use \n\n to separate paragraphs.

Optional chapter fields:

  • subtitle — Chapter subtitle (shown below chapter title).
  • number — Chapter number (for display if using chapter_number_format).

#Customization options that matter

#Typography & spacing

OptionDefaultUse case
chapter_content_font_size12ptMain text size. Margins auto-adjust when changed (14pt, 16pt, etc.).
chapter_content_line_height1.6Line spacing. Higher values (1.8, 2.0) improve readability.
chapter_title_font_size28ptChapter heading size.
chapter_content_text_indent15ptFirst line indent for paragraphs.
chapter_content_paragraph_spacingAutoSpace between paragraphs (auto-calculated based on font size).

#Page format & orientation

OptionValuesUse case
formatA4, A5, LetterPage size. A4 is default (210×297mm).
orientationportrait, landscapePage orientation. Portrait is default.

#Custom metadata fields

Display additional information on the annotation page:

"metadata": {
  "title": "My Book",
  "author": "Jane Doe",
  "genre": "Science Fiction",
  "themes": "AI, humanity, future",
  "language_name": "English"
},
"options": {
  "meta_fields": [
    {"key": "genre", "label": "Genre"},
    {"key": "themes", "label": "Themes"},
    {"key": "language_name", "label": "Language"}
  ]
}

Any field in metadata can be displayed by adding it to meta_fields.

#Toggle sections on/off

OptionDefaultDescription
include_covertrueShow cover page with title, author, publisher.
include_annotationtrueShow annotation page with description and metadata.
include_copyrighttrueShow copyright page at the end.
chapter_show_titletrueShow chapter titles.
chapter_show_headertrueShow running headers on chapter pages.

#Reading & acting on responses

{
  "success": true,
  "pdf_url": "https://yeb.to/storage/ebooks/ebook_abc123.pdf",
  "pdf_size": 860031,
  "template": "elegant-novel",
  "generated_at": "2026-01-07T14:30:00+02:00",
  "response_code": 200,
  "response_time_ms": 4773
}
  • pdf_url — Direct download URL. Files are kept for 24 hours, then auto-deleted.
  • pdf_size — File size in bytes. Useful for bandwidth estimation.
  • template — Template used for generation (currently only elegant-novel).
  • generated_at — ISO 8601 timestamp. Use for cache invalidation or logging.
  • response_time_ms — Processing time. Typically 2-5 seconds for standard books.

#Typical errors & how to fix

{ "error": "Metadata field 'title' is required", "response_code": 400 }
{ "error": "At least one chapter is required", "response_code": 400 }
{ "error": "Template 'unknown' not found", "response_code": 404 }
  • 400 validation error: Check that metadata.title, metadata.author, and at least one chapter are provided.
  • 401 invalid key: Verify your API key is correct and has sufficient credits.
  • 404 template not found: Use elegant-novel as the template name.
  • 500 generation failed: Check for malformed JSON or extremely large content. Contact support if persists.

#Troubleshooting & field notes

  1. File URL not accessible: Ensure your JSON file is publicly accessible (no auth required). Test by opening the URL in a browser - it should download/display the JSON. Check CORS headers if serving from a different domain.
  2. Invalid JSON format: Validate your JSON file before uploading. Use a JSON validator or jq to check syntax. Common errors: trailing commas, unquoted keys, smart quotes instead of straight quotes.
  3. Text overlaps page numbers: The API auto-adjusts margins based on chapter_content_font_size. If using very large fonts (>20pt), verify the output. Margins scale automatically: 12pt = 22mm bottom, 16pt = 27mm bottom, 20pt = 32mm bottom.
  4. Fonts not loading: Ensure options.include_fonts is true (default). For custom fonts, use options.custom_fonts with Google Fonts URLs.
  5. Paragraphs not separating: Use \n\n (double newline) in chapter content to separate paragraphs, not single \n.
  6. Custom metadata not showing: Add the field to both metadata object AND options.meta_fields array with matching key.
  7. Processing timeout: Very long books (>500 pages) may timeout. Processing time: 10-50 pages = 5-15s, 50-200 pages = 30-60s, 200-500 pages = 2-3 minutes. Consider splitting into volumes if needed.
  8. PDF file expires: PDFs are auto-deleted after 24 hours. Download immediately after generation or store on your own CDN.
  9. Inconsistent spacing: Use the same chapter_content_line_height value for all requests to maintain consistency across documents.

#Best practices

  • Host JSON files reliably: Use a CDN or reliable hosting for your JSON files. Ensure files remain accessible for the duration of the API call (2-3 minutes for large books).
  • Validate JSON before upload: Use a JSON validator to catch syntax errors. Invalid JSON will fail immediately with a 400 error.
  • Use descriptive filenames: Name files clearly (e.g., book-{id}-{timestamp}.json) for easier debugging and tracking.
  • Cache responses: Same file_url = same output. Cache PDF URLs for 24h to avoid regenerating identical documents.
  • Pre-validate content: Check for required fields (title, author, chapters) before creating JSON files.
  • Use consistent font sizes: Pick one base font size (12pt, 14pt, or 16pt) for your brand and stick with it across all books.
  • Store original JSON: Keep the JSON file for regeneration if needed. PDFs expire after 24h but JSON can be reused indefinitely.
  • Test with real content: Short test chapters may not reveal pagination issues. Use realistic chapter lengths (2000+ words).
  • Monitor response times: Small books: 5-15s, Medium: 30-60s, Large: 2-3 minutes. If consistently slower, check file_url accessibility.
  • Handle 5xx errors gracefully: Implement retry logic with exponential backoff (wait 5s, then 10s, then 20s) for server errors.

#Real-world examples

Example 1: Self-publishing platform

Create mystery-novel.json:

{
  "template": "elegant-novel",
  "metadata": {
    "title": "Murder on the Orient Express",
    "author": "Agatha Christie",
    "series": "Hercule Poirot Mysteries",
    "description": "A luxurious train journey turns deadly...",
    "year": 1934,
    "publisher": "Collins Crime Club",
    "genre": "Mystery",
    "themes": "Murder, investigation, justice"
  },
  "chapters": [
    {"title": "Part I: The Facts", "content": "It was five o'clock on a winter's morning..."},
    {"title": "Part II: The Evidence", "content": "In a small room..."}
  ],
  "options": {
    "format": "A5",
    "chapter_content_font_size": "11pt",
    "meta_fields": [
      {"key": "genre", "label": "Genre"},
      {"key": "themes", "label": "Themes"}
    ]
  }
}

Call API:

curl -X POST "https://api.yeb.to/v1/ebooks/pdf/convert-from-file" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_url": "https://yourdomain.com/books/mystery-novel.json"}'

Example 2: Technical manual with custom branding

Create tech-manual.json:

{
  "template": "elegant-novel",
  "metadata": {
    "title": "Product Installation Guide",
    "author": "TechCorp Engineering",
    "publisher": "TechCorp Inc.",
    "year": 2026
  },
  "chapters": [
    {"title": "1. System Requirements", "content": "Before installation..."},
    {"title": "2. Installation Steps", "content": "Follow these steps..."},
    {"title": "3. Troubleshooting", "content": "If you encounter issues..."}
  ],
  "options": {
    "chapter_content_font_size": "12pt",
    "include_annotation": false,
    "chapter_show_number": true
  },
  "texts": {
    "copyright_text": "© {year} TechCorp Inc. All rights reserved.",
    "chapter_number_format": "Section {n}"
  }
}

Call API:

curl -X POST "https://api.yeb.to/v1/ebooks/pdf/convert-from-file" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_url": "https://yourdomain.com/manuals/tech-manual.json"}'

#API Changelog

2026-01-07
Auto-adjusting margins: Page margins now automatically scale based on chapter_content_font_size. Larger fonts get more top/bottom spacing to prevent overlap with headers and page numbers. Fixed: Text no longer overlaps page numbers on multi-page chapters.
2026-01-06
Custom metadata fields: Added options.meta_fields to display custom metadata on annotation page. Fixed: Custom metadata fields (genre, themes, etc.) now properly render when specified.
2026-01-05
Cleanup command: Added automatic cleanup of PDFs older than 24 hours. Files are now auto-deleted to save storage. Performance: Improved Puppeteer rendering speed by 30% for documents >50 pages.
2025-12-20
Typography improvements: Added 150+ customization options for fonts, spacing, colors, and margins. Google Fonts support with PT Serif, Bad Script, and Marck Script as defaults.
2025-12-01
Public v1 release with elegant-novel template. Support for cover page, annotation page, automatic page numbering, and copyright page.

자주 묻는 질문

Elegant Novel 템플릿을 제공합니다. 표지, 주석 페이지, 자동 페이지 번호, 러닝 헤더가 있는 전문적인 북 레이아웃입니다. 소설과 내러티브 콘텐츠에 적합합니다.

A4 (210×297mm), A5 (148×210mm), Letter (215.9×279.4mm) 형식을 지원합니다. 모두 세로 방향입니다.

네! 150개 이상의 커스터마이징 옵션이 있습니다. 여백은 글꼴 크기에 따라 자동으로 조정됩니다.

약 500페이지까지 생성할 수 있습니다. 짧은 책(10-50페이지) 5-15초, 중간(50-200) 30-60초, 큰 책(200-500) 2-3분.

각 PDF 생성은 페이지 수에 관계없이 2크레딧입니다. $10부터 패키지로 구매 가능합니다.

API는 API 키당 초당 5개 요청으로 제한됩니다.

생성된 PDF는 24시간 후 자동 삭제됩니다. 즉시 다운로드하거나 자체 CDN에 저장하세요.

필수: 제목과 저자. 선택: 설명, 부제, 시리즈명, 연도, 출판사, ISBN, 표지 이미지, meta_fields를 통한 커스텀 필드.

예. 오류가 발생한 요청을 포함하여 모든 요청은 크레딧을 소비합니다. 크레딧은 성공 또는 실패와 관계없이 요청 수에 연결됩니다. 오류가 당사 플랫폼 문제로 인한 것이 분명한 경우 영향을 받은 크레딧을 복원합니다(현금 환불 없음).

[email protected]로 문의하세요. 피드백을 진지하게 받아들입니다—버그 리포트나 기능 요청이 의미 있는 경우 API를 빠르게 수정하거나 개선하고 감사의 표시로 50 무료 크레딧을 제공합니다.

API와 때로는 엔드포인트에 따라 다릅니다. 일부 엔드포인트는 외부 소스의 데이터를 사용하며 더 엄격한 제한이 있을 수 있습니다. 남용을 방지하고 플랫폼 안정성을 유지하기 위해 제한도 적용합니다. 각 엔드포인트의 구체적인 제한은 문서를 확인하세요.

크레딧 시스템으로 운영됩니다. 크레딧은 API 호출과 도구에 사용하는 선불, 환불 불가 단위입니다. 크레딧은 FIFO(오래된 것부터) 방식으로 소비되며 구매일로부터 12개월간 유효합니다. 대시보드에 각 구매 날짜와 만료일이 표시됩니다.

예. 구매한 모든 크레딧(소수 잔액 포함)은 구매일로부터 12개월간 유효합니다. 미사용 크레딧은 유효 기간 종료 시 자동으로 만료되어 영구 삭제됩니다. 만료된 크레딧은 복원하거나 현금 또는 기타 가치로 전환할 수 없습니다. 경과 규칙: 2025년 9월 22일 이전에 구매한 크레딧은 2025년 9월 22일에 구매한 것으로 처리되어 2026년 9월 22일에 만료됩니다(구매 시 더 이른 만료일이 명시되지 않은 한).

예—유효 기간 내에서 이월됩니다. 미사용 크레딧은 계속 사용 가능하며 구매 후 12개월 만료까지 매월 이월됩니다.

크레딧은 환불 불가입니다. 필요한 만큼만 구매하세요—나중에 언제든 충전할 수 있습니다. 플랫폼 오류로 인해 청구가 실패한 경우 조사 후 영향을 받은 크레딧을 복원할 수 있습니다. 현금 환불 없음.

가격은 달러가 아닌 크레딧으로 설정됩니다. 각 엔드포인트에는 자체 비용이 있습니다—위의 "크레딧 / 요청" 배지를 참조하세요. 항상 정확한 지출 금액을 알 수 있습니다.
← API로 돌아가기