pdfimport

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package pdfimport 为 converter 注册 PDF→OFD 导入器(输入格式 "pdf")。

该包依赖 internal/pdf2ofd(进而依赖 pdfcpu)。单独成包是为了让只做 OFD→X 的使用方不必链接这些依赖;需要 PDF→OFD 时按空白导入启用:

import _ "github.com/zc310/ofd/pkg/converter/pdfimport"

之后即可使用 converter.Convert("pdf", "ofd", ...),或直接调用本包的 Convert/ConvertFile。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(input any, output io.Writer) error

Convert 将 PDF 输入转换为 OFD 文档,input 支持 PDF 文件路径、[]byte 或 io.Reader。

func ConvertFile

func ConvertFile(pdfPath, ofdPath string) error

ConvertFile 是 Convert 的按路径便捷形式。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL