|
@@ -0,0 +1,384 @@
|
|
|
+#ifndef PUBLIC_FPDFCONVERT_H_
|
|
|
+#define PUBLIC_FPDFCONVERT_H_
|
|
|
+
|
|
|
+#ifdef LINUX_SERVER
|
|
|
+#define FPDFCONVERT_EXPORT __attribute__((visibility("default")))
|
|
|
+#else
|
|
|
+#define FPDFCONVERT_EXPORT
|
|
|
+#endif
|
|
|
+
|
|
|
+#include <vector>
|
|
|
+
|
|
|
+class CFP_PdfToWord;
|
|
|
+class CFP_PdfToPPT;
|
|
|
+class CFP_PdfToExcel;
|
|
|
+class CFP_PdfToTable;
|
|
|
+class CFP_PdfToTxt;
|
|
|
+class CFP_PdfToImg;
|
|
|
+class CFP_PdfToRtf;
|
|
|
+class CFP_PdfToHtml;
|
|
|
+class CFP_PDFExtraceText;
|
|
|
+class CFP_PDFExtraceTable;
|
|
|
+class CFP_PDFExtracePDF;
|
|
|
+#ifdef USEOCR
|
|
|
+class CFP_PdfToEditable;
|
|
|
+#endif // USEOCR
|
|
|
+
|
|
|
+
|
|
|
+// #define ERR_SUCCESS_ 1000// 成功
|
|
|
+// #define ERR_UNKNOWN_ 1001// 未知错误
|
|
|
+// #define ERR_VERIFY_ 1002// 认证失败
|
|
|
+// #define ERR_INVALID_ 1003// license无效
|
|
|
+// #define ERR_OVERDUE_ 1004// license过期
|
|
|
+// #define ERR_DATA_ 1005// license数据错误
|
|
|
+// #define ERR_PLATFORM_ 1006// platform错误
|
|
|
+// #define ERR_IDENTIFIER_ 1007// identifier错误
|
|
|
+
|
|
|
+typedef struct fpdf_to_word_t__ *FPDF_TO_WORD;
|
|
|
+typedef struct fpdf_to_ppt_t__ *FPDF_TO_PPT;
|
|
|
+typedef struct fpdf_to_excel_t__ *FPDF_TO_EXCEL;
|
|
|
+typedef struct fpdf_to_excel_table_t__ *FPDF_TO_TABLE;
|
|
|
+typedef struct fpdf_to_txt_t__ *FPDF_TO_TXT;
|
|
|
+typedef struct fpdf_to_csv_t__ *FPDF_TO_CSV;
|
|
|
+typedef struct fpdf_to_img_t__ *FPDF_TO_IMG;
|
|
|
+typedef struct fpdf_to_rtf_t__ *FPDF_TO_RTF;
|
|
|
+typedef struct fpdf_to_html_t__ *FPDF_TO_HTML;
|
|
|
+typedef struct fpdf_handle_ *FPDF_HANDLE;
|
|
|
+typedef struct fpdf_to_table_json_t__ *FPDF_TO_TableJson;
|
|
|
+
|
|
|
+typedef bool (*PSO_StartOCR)(const char *img_path,size_t size); //number is not 0,img_path is memmorydata
|
|
|
+
|
|
|
+enum ConvertPlatForm {
|
|
|
+ P_MAC, P_IOS, P_ANDROID, P_WIN, P_LINUX, P_OTHERS
|
|
|
+};
|
|
|
+
|
|
|
+enum ConvertType {
|
|
|
+ T_PPT, T_WORD, T_TXT, T_EXCEL, T_TABLE, T_CSV, T_IMG, T_RTF, T_HTML, T_ExtractText, T_ExtractTable, T_EDITABLE, T_ExtractPDF
|
|
|
+};
|
|
|
+
|
|
|
+#ifndef CONVERT_HTML_PARAMS_
|
|
|
+#define CONVERT_HTML_PARAMS_
|
|
|
+//转换出的文档类型
|
|
|
+enum PageAndNavigationPaneOptions : int {
|
|
|
+ SinglePage = 0, //单页
|
|
|
+ //SinglepageNavigationByTitle,//导览框架 基于标题 未实现 需要文件标题数据,预留接口
|
|
|
+ SinglePageNavigationByBookmarks,//导览框架 基于书签
|
|
|
+ MultiplePages,//多页拆分
|
|
|
+ //MultiplePagesSplitByTitle,//多页按标题拆分 未实现 需要文件标题数据,预留接口
|
|
|
+ MultiplePagesSplitByBookmarks//多页按书签拆分
|
|
|
+};
|
|
|
+#endif //CONVERT_HTML_PARAMS_
|
|
|
+
|
|
|
+#ifndef CONVERTPARAMS_
|
|
|
+#define CONVERTPARAMS_
|
|
|
+enum ImgType {
|
|
|
+ JPEG, PNG //, BMP, GIF, TIFF, TGA, JPEG2000
|
|
|
+};
|
|
|
+
|
|
|
+enum ExcelMode{
|
|
|
+ OneTableOneSheet, //一个表格一个Sheet
|
|
|
+ PageTablesOneSheet, //一页所有表格一个Sheet
|
|
|
+ AllPagesTablesSingleSheet, //文档所有表格一个Sheet
|
|
|
+ PageTablesTextsOneSheet, //一页所有文字与表格一个Sheet
|
|
|
+ PageTextsOnSheet, //一页所有文本一个Sheet
|
|
|
+ AllPagesTablesTextsSingleSheet //所有文字和表格一个Sheet
|
|
|
+};
|
|
|
+
|
|
|
+enum WordLayoutMode {
|
|
|
+ FlowMode = 1, //流排模式
|
|
|
+ FlowTableMode = 3, //流排支持表格
|
|
|
+ BoxMode = 4 //框排模式
|
|
|
+};
|
|
|
+
|
|
|
+enum OCRLanguage {
|
|
|
+ UNKNOWN = 0, ///< Unknown
|
|
|
+ CHINESE = 1, ///< Simplified Chinese
|
|
|
+ CHINESE_TRA = 2, ///< Traditional Chinese
|
|
|
+ ENGLISH = 3, ///< English
|
|
|
+ KOREAN = 4, ///< Korean
|
|
|
+ JAPANESE = 5, ///< Japanese
|
|
|
+ LATIN = 6, ///< Latin
|
|
|
+};
|
|
|
+
|
|
|
+//1.10.x 新增
|
|
|
+//数据提取参数
|
|
|
+//提取文本
|
|
|
+//开启 OCR 之后目前无法按照段落提取
|
|
|
+enum ExtractTextMode {
|
|
|
+ e_ExtractByLines, //按照行提取
|
|
|
+ e_ExtractByParagraphs, //按照段落提取
|
|
|
+};
|
|
|
+
|
|
|
+typedef struct ConverterParams {
|
|
|
+ bool isOnlyAiTable;
|
|
|
+ bool isContainImg;//是否包含图片
|
|
|
+ bool isImgsMerge;//是否图片合并
|
|
|
+ unsigned int imgDpi;//图片分辨率
|
|
|
+
|
|
|
+ ImgType imgType;//图片类型
|
|
|
+ bool isContainAnnot;//是否包含注释
|
|
|
+ bool isAnnotToImg;//注释是否转成图片
|
|
|
+ bool isPathToImg;//路径是否转成图片
|
|
|
+
|
|
|
+ bool isContainEmptyChar;//是否包含空字符
|
|
|
+
|
|
|
+ WordLayoutMode wordLayoutMode;//Word排版模式
|
|
|
+
|
|
|
+ ExcelMode excelMode;
|
|
|
+ bool isSingleSheetOfExcel;//转Excel是否采用单Sheet
|
|
|
+ bool isAllowOcr;//是否允许开启OCR
|
|
|
+ bool isContainOcrBg;//是否包含OCR底图
|
|
|
+ OCRLanguage ocrLanguage;//OCR语言
|
|
|
+
|
|
|
+ PageAndNavigationPaneOptions htmlOptions;
|
|
|
+
|
|
|
+ bool isCsvMerge;//是否合并CSV
|
|
|
+
|
|
|
+ ExtractTextMode extractTextMode;
|
|
|
+
|
|
|
+ ConverterParams() {
|
|
|
+ isContainImg = true;
|
|
|
+ isImgsMerge = true;
|
|
|
+ imgDpi = 144;
|
|
|
+ imgType = ImgType::PNG;
|
|
|
+ isContainAnnot = true;
|
|
|
+
|
|
|
+ isAnnotToImg = true;
|
|
|
+ isPathToImg = true;
|
|
|
+ isContainEmptyChar = true;
|
|
|
+
|
|
|
+ wordLayoutMode = WordLayoutMode::BoxMode;
|
|
|
+
|
|
|
+ excelMode = OneTableOneSheet;
|
|
|
+ isSingleSheetOfExcel = true;
|
|
|
+ isAllowOcr = false;
|
|
|
+ isContainOcrBg = true;
|
|
|
+ htmlOptions = PageAndNavigationPaneOptions::SinglePage;
|
|
|
+ isCsvMerge = false;
|
|
|
+ isOnlyAiTable = false;
|
|
|
+ extractTextMode = e_ExtractByLines;
|
|
|
+ }
|
|
|
+} ConverterParams;
|
|
|
+
|
|
|
+enum ConvertResult {
|
|
|
+ /// Success, and no error occurs.
|
|
|
+ e_ErrSuccess = 0,
|
|
|
+ /// 取消转换
|
|
|
+ e_ErrCancel = 1,
|
|
|
+ /// File cannot be found or could not be opened.
|
|
|
+ e_ErrFile = 2,
|
|
|
+ /// Invalid password. Usually, this error may occur when loading a PDF document with password. When meet this, user should load document again with correct password.
|
|
|
+ e_ErrPDFPassword = 3,
|
|
|
+ /// PDF页面加载失败
|
|
|
+ e_ErrPDFPage = 4,
|
|
|
+ /// Format is invalid. For files, this may also mean that file is corrupted.
|
|
|
+ e_ErrPDFFormat = 5,
|
|
|
+ /// PDF document is encrypted by some unsupported security handler.
|
|
|
+ e_ErrPDFSecurity = 6,
|
|
|
+ /// Out-of-memory error occurs.
|
|
|
+ e_ErrOutOfMemory = 7,
|
|
|
+ /// 系统IO错误
|
|
|
+ e_ErrIO = 8,
|
|
|
+ /// 文件夹压缩失败
|
|
|
+ e_ErrCompress = 9,
|
|
|
+
|
|
|
+ /// The license is invalid
|
|
|
+ e_ErrLicenseInvalid = 20,
|
|
|
+ /// The license has expired
|
|
|
+ e_ErrLicenseExpire = 21,
|
|
|
+ /// The license does not support the current platform
|
|
|
+ e_ErrLicenseUnsupportedPlatform = 22,
|
|
|
+ /// The license does not support the application id
|
|
|
+ e_ErrLicenseUnsupportedID = 23,
|
|
|
+ /// The license does not support the device id
|
|
|
+ e_ErrLicenseUnsupportedDevice = 24,
|
|
|
+ /// The license does not have the function permission
|
|
|
+ e_ErrLicensePermissionDeny = 25,
|
|
|
+ /// License has not been initialized
|
|
|
+ e_ErrLicenseUninitialized = 26,
|
|
|
+ /// Illegal access to the API interface
|
|
|
+ e_ErrLicenseIllegalAccess = 27,
|
|
|
+ /// Failed to read license file
|
|
|
+ e_ErrLicenseFileReadFailed = 28,
|
|
|
+
|
|
|
+ /// PDF文档中没有表格
|
|
|
+ e_ErrNoTable = 40,
|
|
|
+ /// 调用OCR识别失败
|
|
|
+ e_ErrOCRFailure = 41,
|
|
|
+
|
|
|
+ /// 未知错误
|
|
|
+ e_ErrUnknown = 100
|
|
|
+};
|
|
|
+#endif //CONVERTPARAMS_
|
|
|
+
|
|
|
+#ifdef __cplusplus
|
|
|
+extern "C" {
|
|
|
+#endif
|
|
|
+// Conversions to/from underlying types.
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToWord *CFPPdfToWordFromFPDFToWord(FPDF_TO_WORD word);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_WORD FPDFToWordFromCFPPdfToWord(CFP_PdfToWord *word);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToPPT *CFPPdfToPPTFromFPDFTOPPT(FPDF_TO_PPT ppt);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_PPT FPDFTOPPTFromCFPPdfToPPT(CFP_PdfToPPT *ppt);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToExcel *CFPPdfToExcelFromFPDFTOEXCEL(FPDF_TO_EXCEL excel);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_EXCEL FPDFTOEXCELFromCFPPdfToExcel(CFP_PdfToExcel *excel);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToTable *CFPPdfToTableFromFPDFTOTABLE(FPDF_TO_TABLE table);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_TABLE FPDFTOTABLEFromCFPPdfToTable(CFP_PdfToTable *table);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToTxt *CFPPdfToTxtFromFPDFToTxt(FPDF_TO_TXT txt);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_TXT FPDFToTxtFromCFPPdfToTxt(CFP_PdfToTxt *txt);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToTable *CFPPdfToCsvFromFPDFTOCSV(FPDF_TO_CSV csv);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_CSV FPDFTOCSVFromCFPPdfToCsv(CFP_PdfToTable *csv);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToImg *CFPPdfToImgFromFPDFToImg(FPDF_TO_IMG img);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_IMG FPDFToImgFromCFPPdfToImg(CFP_PdfToImg *img);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToRtf *CFPPdfToRtfFromFPDFToRtf(FPDF_TO_RTF rtf);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_RTF FPDFToRtfFromCFPPdfToRtf(CFP_PdfToRtf *rtf);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToHtml *CFPPdfToHtmlFromFPDFToHtml(FPDF_TO_HTML html);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_HTML FPDFToHtmlFromCFPPdfToHtml(CFP_PdfToHtml *html);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE FPDFExtractTextFromCFPPdfExtractText(CFP_PDFExtraceText* exctarct_text);
|
|
|
+FPDFCONVERT_EXPORT CFP_PDFExtraceText* FPDFExtractTextToCFPPdfExtractText(FPDF_HANDLE exctarct_text);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE FPDFExtractTableFromCFPPdfExtractTable(CFP_PDFExtraceTable* exctarct_table);
|
|
|
+FPDFCONVERT_EXPORT CFP_PDFExtraceTable* FPDFExtractTableToCFPPdfExtractTable(FPDF_HANDLE exctarct_table);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE FPDFExtractPDFFromCFPPdfExtractPDF(CFP_PDFExtracePDF* exctarct_pdf);
|
|
|
+FPDFCONVERT_EXPORT CFP_PDFExtracePDF* FPDFExtractPDFToCFPPdfExtractPDF(FPDF_HANDLE exctarct_pdf);
|
|
|
+
|
|
|
+#ifdef USEOCR
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE FPDFToEditableFromCFPPdfToEditable(CFP_PdfToEditable* pdf_editable);
|
|
|
+FPDFCONVERT_EXPORT CFP_PdfToEditable* FPDFToEditableToCFPPdfToEditable(FPDF_HANDLE pdf_editable);
|
|
|
+#endif
|
|
|
+
|
|
|
+//旧接口废弃
|
|
|
+//FPDFCONVERT_EXPORT int CPDF_initPermission(const char *key, const char *secret, const char *packageName, const int current_time, const ConvertPlatForm &platForm, int *type, bool id_verify);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_initPermission(const char* license_file, bool isFile, const char* deviceId, const char* appId, bool id_verify);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_initRes(const char *path);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_ReleaseRes();
|
|
|
+FPDFCONVERT_EXPORT int CPDF_getPagesByFd(const int fd, const char *user_pwd);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_getPagesByPath(const char *strPdfFile, const char *strUserPwd);
|
|
|
+FPDFCONVERT_EXPORT char *getFileSizeStr(const char *filename);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT bool FileIsImage(const char *filename);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToWord();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToPPT();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToTxt();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToExcel();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToTable();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToCsv();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToImg();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToRtf();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToHtml();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowOcr();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowExtract();
|
|
|
+FPDFCONVERT_EXPORT bool isAllowToSearchablePDF();
|
|
|
+FPDFCONVERT_EXPORT void CPDF_ConvertPages(void *fpdf_to_handle, int pages, ConvertType type);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_getPages(void *fpdf_to_handle, ConvertType type);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_Cancel(void *fpdf_to_handle, ConvertType type);
|
|
|
+FPDFCONVERT_EXPORT bool CPDF_IsCancel(void *fpdf_to_handle, ConvertType type);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_Release(void *fpdf_to_handle, ConvertType type);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT void CPDF_setStartOcr(PSO_StartOCR pfunc);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_setOcrResult(const char *result);
|
|
|
+FPDFCONVERT_EXPORT const char *CPDF_getOcrKey();
|
|
|
+FPDFCONVERT_EXPORT int CPDF_verifyOcrKey(const char *secret, char *result);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_WORD CPDF_InitPDFToWordByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_WORD CPDF_InitIMGToWord(const char *imgPath, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_WORD CPDF_InitPDFToWordByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToWord(FPDF_TO_WORD word, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToWord(FPDF_TO_WORD word, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_PPT CPDF_InitIMGToPPT(const char *imgPath, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_PPT CPDF_InitPDFToPPTByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_PPT CPDF_InitPDFToPPTByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToPPT(FPDF_TO_PPT ppt, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToPPT(FPDF_TO_PPT ppt, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_EXCEL CPDF_InitIMGToExcel(const char *imgPath, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_EXCEL CPDF_InitPDFToExcelByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_EXCEL CPDF_InitPDFToExcelByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT bool CPDF_InitExcelXML(FPDF_TO_EXCEL excel, const int convertPages);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToExcel(FPDF_TO_EXCEL excel, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToExcel(FPDF_TO_EXCEL excel, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_TABLE CPDF_InitIMGToTable(const char *imgPath, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_TABLE CPDF_InitPDFToTableByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_TABLE CPDF_InitPDFToTableByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT bool CPDF_InitTableXML(FPDF_TO_TABLE table, const int convertPages);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToTable(FPDF_TO_TABLE table, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToTable(FPDF_TO_TABLE table, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_CSV CPDF_InitIMGToCSv(const char *imgPath, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_CSV CPDF_InitPDFToCsvByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_CSV CPDF_InitPDFToCsvByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT bool CPDF_InitCsvXML(FPDF_TO_CSV csv, const int convertPages);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToCsv(FPDF_TO_CSV csv, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToCsv(FPDF_TO_CSV csv, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_TXT CPDF_InitIMGToTxt(const char *imgPath, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_TXT CPDF_InitPDFToTxtByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_TXT CPDF_InitPDFToTxtByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToTxt(FPDF_TO_TXT txt, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToTxt(FPDF_TO_TXT txt, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_IMG CPDF_InitPDFToImgByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_IMG CPDF_InitPDFToImgByPath(const char *strPdfFile, ConverterParams ¶ms, const char *strOutputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToImg(FPDF_TO_IMG img, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToImg(FPDF_TO_IMG img, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_RTF CPDF_InitIMGToRTF(const char *imgPath, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_RTF CPDF_InitPDFToRTFByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_RTF CPDF_InitPDFToRTFByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_InitPDFToRTFPages(FPDF_TO_RTF rtf, int *pages, int len);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToRTF(FPDF_TO_RTF rtf, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToRTF(FPDF_TO_RTF rtf, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_HTML CPDF_InitIMGToHTML(const char *imgPath, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_HTML CPDF_InitPDFToHTMLByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_TO_HTML CPDF_InitPDFToHTMLByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToHTML(FPDF_TO_HTML html, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToHTML(FPDF_TO_HTML html, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE CPDF_InitPDFExtractTextByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE CPDF_InitPDFExtractTextByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFExtractText(FPDF_HANDLE handle, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFExtractText(FPDF_HANDLE handle, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE CPDF_InitPDFExtractTableByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE CPDF_InitPDFExtractTableByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFExtractTable(FPDF_HANDLE handle, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFExtractTable(FPDF_HANDLE handle, char *pOutPath);
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE CPDF_InitPDFExtractPDFByFd(const int fd, const char *name, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE CPDF_InitPDFExtractPDFByPath(const char *strPdfFile, ConverterParams ¶ms, const char *outputDir, const char *outputFilenameNoSuffix, const char *strUserPwd, ConvertResult *result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFExtractPDF(FPDF_HANDLE handle, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFExtractPDF(FPDF_HANDLE handle, char *pOutPath);
|
|
|
+
|
|
|
+#ifdef USEOCR
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE CPDF_InitPDFToSearchableByFd(const int fd, const char* name, ConverterParams& params, const char* outputDir, const char* outputFilenameNoSuffix, const char* strUserPwd, ConvertResult* result);
|
|
|
+FPDFCONVERT_EXPORT FPDF_HANDLE CPDF_InitPDFToSearchableByPath(const char* strPdfFile, ConverterParams& params, const char* outputDir, const char* outputFilenameNoSuffix, const char* strUserPwd, ConvertResult* result);
|
|
|
+FPDFCONVERT_EXPORT int CPDF_StartPDFToSearchable(FPDF_HANDLE handle, int nPageNo, int nPageid);
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EndPDFToSearchable(FPDF_HANDLE handle, char *pOutPath);
|
|
|
+#endif
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT int CPDF_GetMajorNumber();
|
|
|
+FPDFCONVERT_EXPORT int CPDF_GetMinorNumber();
|
|
|
+FPDFCONVERT_EXPORT int CPDF_GetRevisionNumber();
|
|
|
+FPDFCONVERT_EXPORT const char* CPDF_GetVersion();
|
|
|
+FPDFCONVERT_EXPORT const char * CPDF_GetBuildTag();
|
|
|
+
|
|
|
+FPDFCONVERT_EXPORT void CPDF_EnableLog(bool is_enable, char* filename, bool is_standOutput);
|
|
|
+
|
|
|
+#ifdef __cplusplus
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+#endif // PUBLIC_FPDFCONVERT_H_
|