Qt pdf文件转换操作

qt文件转换操作,包括word转为pdf;Excel转为pdf;PPT转为pdf;image转为pdf;pdf转为文本文件;pdf导出图片;接口如下所示:

#pragma once

#include <QObject>

#include "filetransformhandle_global.h"

enum FileTransformType

{

fttNone = 0,

fttWordToPdf = 1, //word转为pdf

fttExcelToPdf = 2, //Excel转为pdf

fttPPTToPdf = 3, //PPT转为pdf

fttImageToPdf = 4, //image转为pdf

fttpdfToText = 5, //提取pdf文本

fttpdfToImage = 6, //pdf导出图片 strDesFilePath:表示导出的文件夹

fttcmdpdfToText = 7, // 命令行提取pdf的文本

fttcmdpdfToHtml = 8, // 命令行提取pdf到html

fttDirImageToPdf = 9, // 多个image转为pdf strSourceFilePath:表示文件夹

};

class FILETRANSFORMHANDLE_EXPORT FileTrasformOperatorHandle : public QObject

{

Q_OBJECT

public:

FileTrasformOperatorHandle();

FileTrasformOperatorHandle(const QString& strSourceFilePath, const QString& strDesFilePath);

void setTransformType(FileTransformType eTransformType);

void setSourceFilePath(const QString& strSourceFilePath);

void setTargetFilePath(const QString& strDesFilePath);

void run();

bool runCommand(const QString& strParam);

private:

void _run(const QString& strParam);

signals:

void startTransform(const QString& pdfFilePath);

void finished(const QString& pdfFilePath);

private:

QString m_strSourceFilePath; // 源文件

QString m_strDesFilePath; // 目的文件

FileTransformType m_eTransformType; // 转换类型

};

相关推荐
追风赶月、7 小时前
【QT】事件(鼠标、按键、定时器、窗口)
qt
牵牛老人10 小时前
Qt处理USB摄像头开发说明与QtMultimedia与V4L2融合应用
stm32·单片机·qt
-凌凌漆-14 小时前
【Qt】QStringLiteral 介绍
开发语言·qt
想要入门的程序猿14 小时前
Qt写入excel
数据库·qt·excel
丁劲犇15 小时前
用 Turbo Vision 2 为 Qt 6 控制台应用创建 TUI 字符 MainFrame
开发语言·c++·qt·tui·字符界面·curse
charlie11451419116 小时前
深入理解Qt的SetWindowsFlags函数
开发语言·c++·qt·原理分析
醇醛酸醚酮酯18 小时前
Qt项目锻炼——TODO清单(二)
开发语言·数据库·qt
Mr_Xuhhh19 小时前
信号与槽的总结
java·开发语言·数据库·c++·qt·系统架构
灵性花火21 小时前
Qt的前端和后端过于耦合(0/7)
开发语言·前端·qt
菜鸟看点1 天前
自定义Cereal XML输出容器节点
c++·qt