Documentation
¶
Overview ¶
Package anydoc converts documents to Markdown through the embedded anydoc 0.2.4 WebAssembly build
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotDocument = errors.New("not a document anydoc reads")
Bytes that neither their content nor the given name mark as a document anydoc reads
var Extensions = []string{"doc", "docx", "docm", "odt", "pdf", "ppt", "pps", "pot", "pptx", "pptm", "ppsx", "ppsm", "rtf", "epub", "xlsx", "xlsm", "xlsb", "xls", "ods", "odp", "csv"}
Extensions lists the formats the converter accepts, without dots
Functions ¶
Types ¶
type ConvertError ¶
type ConvertError struct {
Kind string
Message string
// Pages lists the 1-indexed scanned pages when Kind is NeedsOcrError
Pages []int
// PageCount is the page total when Kind is NeedsOcrError
PageCount int
}
ConvertError is a failure anydoc reported, Kind being the Rust variant name suffixed with Error
func (*ConvertError) Encrypted ¶
func (e *ConvertError) Encrypted() bool
Document locked by a password the conversion was not given
func (*ConvertError) Error ¶
func (e *ConvertError) Error() string
func (*ConvertError) NeedsOCR ¶
func (e *ConvertError) NeedsOCR() bool
NeedsOCR reports whether the conversion failed because the document has no text layer
func (*ConvertError) NoTextLayer ¶
func (e *ConvertError) NoTextLayer() bool
PDF that yielded no text on any page, the one failure the crate reports under that variant once a format is known