Skip to content

Commit 03e1b51

Browse files
authored
docs: sync README & upgrade to 1.0.6 (#317)
1 parent 877000a commit 03e1b51

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ transform_markdown(
8888
analysing_path="temp", # Optional: specify temporary folder
8989
ocr_size="gundam", # Optional: tiny, small, base, large, gundam
9090
models_cache_path="models", # Optional: model cache path
91+
dpi=300, # Optional: DPI for rendering PDF pages (default: 300)
92+
max_page_image_file_size=None, # Optional: max image file size in bytes, auto-adjust DPI if exceeded
9193
includes_footnotes=True, # Optional: include footnotes
9294
ignore_pdf_errors=False, # Optional: continue on PDF rendering errors
9395
ignore_ocr_errors=False, # Optional: continue on OCR recognition errors
@@ -107,6 +109,8 @@ transform_epub(
107109
analysing_path="temp", # Optional: specify temporary folder
108110
ocr_size="gundam", # Optional: tiny, small, base, large, gundam
109111
models_cache_path="models", # Optional: model cache path
112+
dpi=300, # Optional: DPI for rendering PDF pages (default: 300)
113+
max_page_image_file_size=None, # Optional: max image file size in bytes, auto-adjust DPI if exceeded
110114
includes_cover=True, # Optional: include cover
111115
includes_footnotes=True, # Optional: include footnotes
112116
ignore_pdf_errors=False, # Optional: continue on PDF rendering errors

README_zh-CN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ transform_markdown(
8888
analysing_path="temp", # 可选:指定临时文件夹
8989
ocr_size="gundam", # 可选:tiny, small, base, large, gundam
9090
models_cache_path="models", # 可选:模型缓存路径
91+
dpi=300, # 可选:渲染 PDF 页面的 DPI(默认:300)
92+
max_page_image_file_size=None, # 可选:最大图像文件大小(字节),超出时自动调整 DPI
9193
includes_footnotes=True, # 可选:包含脚注
9294
ignore_pdf_errors=False, # 可选:遇到 PDF 渲染错误时继续处理
9395
ignore_ocr_errors=False, # 可选:遇到 OCR 识别错误时继续处理
@@ -107,6 +109,8 @@ transform_epub(
107109
analysing_path="temp", # 可选:指定临时文件夹
108110
ocr_size="gundam", # 可选:tiny, small, base, large, gundam
109111
models_cache_path="models", # 可选:模型缓存路径
112+
dpi=300, # 可选:渲染 PDF 页面的 DPI(默认:300)
113+
max_page_image_file_size=None, # 可选:最大图像文件大小(字节),超出时自动调整 DPI
110114
includes_cover=True, # 可选:包含封面
111115
includes_footnotes=True, # 可选:包含脚注
112116
ignore_pdf_errors=False, # 可选:遇到 PDF 渲染错误时继续处理

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pdf-craft"
7-
version = "1.0.5"
7+
version = "1.0.6"
88
description = "PDF craft can convert PDF files into various other formats. This project will focus on processing PDF files of scanned books."
99
license = "MIT"
1010
authors = ["Tao Zeyu <i@taozeyu.com>"]

0 commit comments

Comments
 (0)