Documentation
¶
Overview ¶
Package htmlbridge 将预处理为 HTML 的输入接入现有浏览器转换链,统一复用 纸张、临时目录、资源访问、取消处理以及 PDF 导入设置。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Document ¶
type Document struct {
HTML []byte
Attachments []creator.Attachment
}
Document 是预处理后的页面内容和需原样保留的上游附件。
type Importer ¶
type Importer struct {
Format, MIMEType string
Prepare func(input any, conv *converter.Converter) (Document, error)
}
Importer 对输入执行 Prepare,复用 HTML→PDF,然后在 OFD 写出时携带附件。
func (*Importer) Extensions ¶
type PDFTransformer ¶
type PDFTransformer struct{ Importer *Importer }
PDFTransformer 直接输出浏览器 PDF,避免为 PDF 目标执行 OFD 往返转换。
func (PDFTransformer) From ¶
func (t PDFTransformer) From() []string
func (PDFTransformer) To ¶
func (t PDFTransformer) To() string
Click to show internal directories.
Click to hide internal directories.