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; // 转换类型

};

相关推荐
春蕾夏荷_7282977253 分钟前
qcustomplot 显示坐标轴
qt·qcustomplot·坐标轴
郝学胜-神的一滴13 分钟前
Qt删除布局与布局切换技术详解
开发语言·数据库·c++·qt·程序人生·系统架构
yy_xzz4 小时前
Debian 系统中 Qt Creator 用 sudo 启动后权限问题
c++·qt
夏玉林的学习之路8 小时前
正则表达式
数据库·c++·qt·mysql·正则表达式
_OP_CHEN8 小时前
从零开始的QT开发指南:(一)背景、特性与环境搭建
qt·qt下载·图形化界面·gui框架·qt环境配置·qt sdk配置·qt环境变量配置
「QT(C++)开发工程师」1 天前
VTK开源视觉库 | 行业应用第一篇
linux·qt·物联网·计算机视觉·信息可视化·vtk
weixin_467209281 天前
Qt Creator打开项目提示no valid settings file could be found
开发语言·qt
合作小小程序员小小店1 天前
舆情,情感微博系统demo,基于python+qt+nlp,开发语言python,界面库qt,无数据库版,数据来自第三方网站获取,
开发语言·pytorch·qt·自然语言处理·nlp
Larry_Yanan1 天前
QML学习笔记(四十八)QML与C++交互:QML中可实例化C++对象
c++·笔记·qt·学习·ui·交互
伐尘2 天前
【Qt】实现单例程序,禁止程序多开的几种方式
qt