Versions in this module Expand all Collapse all v4 v4.1.0 Jun 1, 2026 Changes in this version + func GetPageCount(filePath, password string) int + func GetRemainingPageQuota() int + func GetVersion() string + func Initialize(resourcePath string) + func LicenseVerify(license, deviceID, appID string) error + func Release() + func ReleaseDocumentAIModel() + func SetDocumentAIModel(modelPath string, gpuID int) error + func SetDocumentAIModelCount(layoutModelCount, tableModelCount int) + func SetLogger(enableInfo, enableWarning bool) + func StartPDFToExcel(filePath, password, outputPath string, opts ExcelOptions, cb ConvertCallback) error + func StartPDFToHtml(filePath, password, outputPath string, opts HtmlOptions, cb ConvertCallback) error + func StartPDFToImage(filePath, password, outputPath string, opts ImageOptions, cb ConvertCallback) error + func StartPDFToJson(filePath, password, outputPath string, opts JsonOptions, cb ConvertCallback) error + func StartPDFToMarkdown(filePath, password, outputPath string, opts MarkdownOptions, ...) error + func StartPDFToOfd(filePath, password, outputPath string, opts OfdOptions, cb ConvertCallback) error + func StartPDFToPpt(filePath, password, outputPath string, opts PptOptions, cb ConvertCallback) error + func StartPDFToRtf(filePath, password, outputPath string, opts RtfOptions, cb ConvertCallback) error + func StartPDFToSearchablePdf(filePath, password, outputPath string, opts SearchablePdfOptions, ...) error + func StartPDFToTxt(filePath, password, outputPath string, opts TxtOptions, cb ConvertCallback) error + func StartPDFToWord(filePath, password, outputPath string, opts WordOptions, cb ConvertCallback) error + type BaseCallback struct + func (BaseCallback) GetLayoutResult() string + func (BaseCallback) GetOCRResult() string + func (BaseCallback) GetTableResult() string + func (BaseCallback) IsCancelled() bool + func (BaseCallback) OnLayout(imagePath string) bool + func (BaseCallback) OnOCR(imagePath string) bool + func (BaseCallback) OnProgress(currentPage, totalPage int) + func (BaseCallback) OnTable(imagePath string) bool + type ConvertCallback interface + GetLayoutResult func() string + GetOCRResult func() string + GetTableResult func() string + IsCancelled func() bool + OnLayout func(imagePath string) bool + OnOCR func(imagePath string) bool + OnProgress func(currentPage, totalPage int) + OnTable func(imagePath string) bool + func NewProgressCallback(fn ProgressFunc) ConvertCallback + type ErrorCode int + const ErrCancel + const ErrCompress + const ErrConverting + const ErrExpire + const ErrFile + const ErrIO + const ErrImageDataEmpty + const ErrImageInvalid + const ErrImageUnsupportedFormat + const ErrImageWHError + const ErrInvalidArg + const ErrInvalidHandle + const ErrInvalidTable + const ErrLicenseConcurrencyExceeded + const ErrLicenseExpire + const ErrLicenseFileReadFailed + const ErrLicenseIllegalAccess + const ErrLicenseInvalid + const ErrLicenseMismatch + const ErrLicenseOCRPermissionDeny + const ErrLicensePageLimitExceeded + const ErrLicensePermissionDeny + const ErrLicenseQuotaCorrupted + const ErrLicenseUninitialized + const ErrLicenseUnsupportedAPI + const ErrLicenseUnsupportedDevice + const ErrLicenseUnsupportedID + const ErrLicenseUnsupportedPlatform + const ErrMissingArg + const ErrModelFormatUnsupported + const ErrModelFunctionUnsupported + const ErrModelInvalidFormat + const ErrModelSDKMismatch + const ErrNoTable + const ErrOCRFailure + const ErrOutOfMemory + const ErrPDFFormat + const ErrPDFPage + const ErrPDFPassword + const ErrPDFSecurity + const ErrSuccess + const ErrUnknown + func (c ErrorCode) Error() string + func (c ErrorCode) IsSuccess() bool + type ExcelOptions struct + AllContent bool + AutoCreateFolder bool + CSVFormat bool + ContainAnnotation bool + ContainImage bool + EnableAILayout bool + EnableAITableRecognition bool + EnableOCR bool + FormulaToImage bool + Languages []OCRLanguage + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + WorksheetOption ExcelWorksheetOption + func NewExcelOptions() ExcelOptions + type ExcelWorksheetOption int + const ExcelForDocument + const ExcelForPage + const ExcelForTable + type HtmlOptions struct + ContainAnnotation bool + ContainImage bool + ContainPageBackgroundImage bool + EnableAILayout bool + EnableAITableRecognition bool + EnableOCR bool + FormulaToImage bool + Languages []OCRLanguage + LayoutMode PageLayoutMode + OCROption OCROption + OutputDocumentPerPage bool + PageOption HtmlPageOption + PageRanges string + func NewHtmlOptions() HtmlOptions + type HtmlPageOption int + const HtmlMultiPage + const HtmlMultiPageWithBookmark + const HtmlSinglePage + const HtmlSinglePageWithBookmark + type ImageColorMode int + const ImageBinary + const ImageColor + const ImageGray + type ImageOptions struct + ImageColorMode ImageColorMode + ImageScaling float32 + ImageType ImageType + PageRanges string + PathEnhance bool + func NewImageOptions() ImageOptions + type ImageType int + const ImageBMP + const ImageGIF + const ImageJPEG + const ImageJPEG2K + const ImageJPG + const ImagePNG + const ImageTGA + const ImageTIFF + const ImageWEBP + type JsonOptions struct + ContainAnnotation bool + ContainImage bool + ContainTable bool + EnableAILayout bool + EnableAITableRecognition bool + EnableOCR bool + Languages []OCRLanguage + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + func NewJsonOptions() JsonOptions + type MarkdownOptions struct + ContainAnnotation bool + ContainImage bool + EnableAILayout bool + EnableAITableRecognition bool + EnableOCR bool + Languages []OCRLanguage + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + func NewMarkdownOptions() MarkdownOptions + type OCRLanguage int + const OCRLangArabic + const OCRLangAuto + const OCRLangChinese + const OCRLangChineseTrad + const OCRLangCyrillic + const OCRLangDevanagari + const OCRLangEnglish + const OCRLangEslav + const OCRLangGreek + const OCRLangJapanese + const OCRLangKannada + const OCRLangKorean + const OCRLangLatin + const OCRLangTamil + const OCRLangTelugu + const OCRLangThai + const OCRLangUnknown + type OCROption int + const OCRAll + const OCRInvalidCharacter + const OCRInvalidCharacterAndScanned + const OCRScanPage + type OfdOptions struct + EnableAITableRecognition bool + EnableOCR bool + Languages []OCRLanguage + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + TransparentText bool + func NewOfdOptions() OfdOptions + type PageLayoutMode int + const PageLayoutBox + const PageLayoutFlow + type PptOptions struct + ContainAnnotation bool + ContainImage bool + ContainPageBackgroundImage bool + EnableAILayout bool + EnableAITableRecognition bool + EnableOCR bool + FormulaToImage bool + Languages []OCRLanguage + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + func NewPptOptions() PptOptions + type ProgressFunc func(currentPage, totalPage int) + type RtfOptions struct + ContainAnnotation bool + ContainImage bool + ContainPageBackgroundImage bool + EnableAILayout bool + EnableAITableRecognition bool + EnableOCR bool + FormulaToImage bool + Languages []OCRLanguage + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + func NewRtfOptions() RtfOptions + type SearchablePdfOptions struct + ContainImage bool + ContainPageBackgroundImage bool + EnableAITableRecognition bool + EnableOCR bool + FormulaToImage bool + Languages []OCRLanguage + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + TransparentText bool + func NewSearchablePdfOptions() SearchablePdfOptions + type TxtOptions struct + EnableAILayout bool + EnableAITableRecognition bool + EnableOCR bool + Languages []OCRLanguage + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + TableFormat bool + func NewTxtOptions() TxtOptions + type WordOptions struct + ContainAnnotation bool + ContainImage bool + ContainPageBackgroundImage bool + EnableAILayout bool + EnableAITableRecognition bool + EnableOCR bool + FormulaToImage bool + Languages []OCRLanguage + LayoutMode PageLayoutMode + OCROption OCROption + OutputDocumentPerPage bool + PageRanges string + func NewWordOptions() WordOptions v4.1.0-SNAPSHOT Jun 1, 2026