Documentation
¶
Overview ¶
Package pdf 为 converter 注册 PDF→OFD 导入器(输入格式 "pdf")。
该包依赖 internal/pdf2ofd(进而依赖 pdfcpu)。单独成包是为了让只做 OFD→X 的使用方不必链接这些依赖;需要 PDF→OFD 时按空白导入启用:
import _ "github.com/zc310/ofd/pkg/converter/import/pdf"
之后即可使用 converter.Convert("pdf", "ofd", ...),或直接调用本包的 Convert/ConvertFile。
Index ¶
- Variables
- func Convert(ctx context.Context, input any, output io.Writer, password string) error
- func ConvertFile(ctx context.Context, pdfPath, ofdPath string, password string) error
- func ConvertFileWithOptions(ctx context.Context, pdfPath, ofdPath string, password string, options Options) error
- func ConvertWithOptions(ctx context.Context, input any, output io.Writer, password string, ...) error
- type Diagnostic
- type LimitError
- type Limits
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLimitExceeded = converter.ErrPDFImportLimitExceeded
View Source
var ErrUnsupported = converter.ErrPDFImportUnsupported
Functions ¶
func ConvertFile ¶
ConvertFile 是 Convert 的按路径便捷形式。
Types ¶
type Diagnostic ¶ added in v0.1.5
type Diagnostic = converter.PDFImportDiagnostic
type LimitError ¶ added in v0.1.5
type LimitError = converter.PDFImportLimitError
type Limits ¶ added in v0.1.5
type Limits = converter.PDFImportLimits
type Options ¶ added in v0.1.5
type Options = converter.PDFImportOptions
Options 控制资源预算、诊断回调和严格模式;零值使用默认预算。
Click to show internal directories.
Click to hide internal directories.