社区
Qt
帖子详情
有关Qt显示pdf的问题??
皮了个特
2014-05-20 05:08:31
如何在Qt编写的程序中显示pdf格式的文件,,,,并且能够进行缩放。。。。谢谢位大神了。。。。。
...全文
431
7
打赏
收藏
有关Qt显示pdf的问题??
如何在Qt编写的程序中显示pdf格式的文件,,,,并且能够进行缩放。。。。谢谢位大神了。。。。。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
wopabe
2014-06-17
打赏
举报
回复
网上有第三方接口,找找吧
皮了个特
2014-06-17
打赏
举报
回复
引用 5 楼 top_worker 的回复:
我也遇到使用qt打开pdf档的困惑,楼主,你的第三方poppler 是怎么安装的啊,
好像是先编译出来,,,,编译成库再引用,,,,这我还没有解决,,,如果你用什么好的办法还请告诉我
top_worker
2014-06-05
打赏
举报
回复
我也遇到使用qt打开pdf档的困惑,楼主,你的第三方poppler 是怎么安装的啊,
皮了个特
2014-05-28
打赏
举报
回复
我是按照网上那个顺序编译的poppler,,,当编译libffi的时候 ./configure没有出错,,,但是当执行make指令时提示MAKE i686-pc-linux-gnu : 0 * all-all make[1]: Entering directory `/Myfile/libffi-3.1/i686-pc-linux-gnu' make 'AR_FLAGS=' 'CC_FOR_BUILD=' 'CFLAGS=-O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions' 'CXXFLAGS=-g -O2' 'CFLAGS_FOR_BUILD=' 'CFLAGS_FOR_TARGET=' 'INSTALL=/usr/bin/install -c' 'INSTALL_DATA=/usr/bin/install -c -m 644' 'INSTALL_PROGRAM=/usr/bin/install -c' 'INSTALL_SCRIPT=/usr/bin/install -c' 'JC1FLAGS=' 'LDFLAGS=' 'LIBCFLAGS=' 'LIBCFLAGS_FOR_TARGET=' 'MAKE=make' 'MAKEINFO=/bin/sh /Myfile/libffi-3.1/missing makeinfo ' 'PICFLAG=' 'PICFLAG_FOR_TARGET=' 'RUNTESTFLAGS=' 'SHELL=/bin/sh' 'exec_prefix=/usr/local' 'infodir=/usr/local/share/info' 'libdir=/usr/local/lib' 'mandir=/usr/local/share/man' 'prefix=/usr/local' 'AR=ar' 'AS=as' 'CC=gcc' 'CXX=g++' 'LD=/usr/bin/ld' 'NM=/usr/bin/nm -B' 'RANLIB=ranlib' 'DESTDIR=' all-recursive make[2]: Entering directory `/Myfile/libffi-3.1/i686-pc-linux-gnu' Making all in include make[3]: Entering directory `/Myfile/libffi-3.1/i686-pc-linux-gnu/include' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/Myfile/libffi-3.1/i686-pc-linux-gnu/include' Making all in testsuite make[3]: Entering directory `/Myfile/libffi-3.1/i686-pc-linux-gnu/testsuite' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/Myfile/libffi-3.1/i686-pc-linux-gnu/testsuite' Making all in man make[3]: Entering directory `/Myfile/libffi-3.1/i686-pc-linux-gnu/man' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/Myfile/libffi-3.1/i686-pc-linux-gnu/man' make[3]: Entering directory `/Myfile/libffi-3.1/i686-pc-linux-gnu' depbase=`echo src/prep_cif.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/prep_cif.lo -MD -MP -MF $depbase.Tpo -c -o src/prep_cif.lo ../src/prep_cif.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/prep_cif.lo -MD -MP -MF src/.deps/prep_cif.Tpo -c ../src/prep_cif.c -fPIC -DPIC -o src/.libs/prep_cif.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/prep_cif.lo -MD -MP -MF src/.deps/prep_cif.Tpo -c ../src/prep_cif.c -o src/prep_cif.o >/dev/null 2>&1 depbase=`echo src/types.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/types.lo -MD -MP -MF $depbase.Tpo -c -o src/types.lo ../src/types.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/types.lo -MD -MP -MF src/.deps/types.Tpo -c ../src/types.c -fPIC -DPIC -o src/.libs/types.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/types.lo -MD -MP -MF src/.deps/types.Tpo -c ../src/types.c -o src/types.o >/dev/null 2>&1 depbase=`echo src/raw_api.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/raw_api.lo -MD -MP -MF $depbase.Tpo -c -o src/raw_api.lo ../src/raw_api.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/raw_api.lo -MD -MP -MF src/.deps/raw_api.Tpo -c ../src/raw_api.c -fPIC -DPIC -o src/.libs/raw_api.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/raw_api.lo -MD -MP -MF src/.deps/raw_api.Tpo -c ../src/raw_api.c -o src/raw_api.o >/dev/null 2>&1 depbase=`echo src/java_raw_api.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/java_raw_api.lo -MD -MP -MF $depbase.Tpo -c -o src/java_raw_api.lo ../src/java_raw_api.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/java_raw_api.lo -MD -MP -MF src/.deps/java_raw_api.Tpo -c ../src/java_raw_api.c -fPIC -DPIC -o src/.libs/java_raw_api.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/java_raw_api.lo -MD -MP -MF src/.deps/java_raw_api.Tpo -c ../src/java_raw_api.c -o src/java_raw_api.o >/dev/null 2>&1 depbase=`echo src/closures.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/closures.lo -MD -MP -MF $depbase.Tpo -c -o src/closures.lo ../src/closures.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/closures.lo -MD -MP -MF src/.deps/closures.Tpo -c ../src/closures.c -fPIC -DPIC -o src/.libs/closures.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/closures.lo -MD -MP -MF src/.deps/closures.Tpo -c ../src/closures.c -o src/closures.o >/dev/null 2>&1 depbase=`echo src/x86/ffi.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/x86/ffi.lo -MD -MP -MF $depbase.Tpo -c -o src/x86/ffi.lo ../src/x86/ffi.c &&\ libtool: link: ranlib .libs/libffi.a libtool: link: ( cd ".libs" && rm -f "libffi.la" && ln -s "../libffi.la" "libffi.la" ) make[3]: Leaving directory `/Myfile/libffi-3.1/i686-pc-linux-gnu' make[2]: Leaving directory `/Myfile/libffi-3.1/i686-pc-linux-gnu' make[1]: Leaving directory `/Myfile/libffi-3.1/i686-pc-linux-gnu'
KeequenLiu
2014-05-27
打赏
举报
回复
一般都用poppler库, 把你编译出错信息放出来 看看
皮了个特
2014-05-27
打赏
举报
回复
SDK???我在网上查的说是有个第三方库叫poppler,,但是编译的时候老是报错,,,
我是调参侠
2014-05-20
打赏
举报
回复
额。。那你不是要知道PDF的格式啊!!我记得Adobe公司有个SDK的,首先你要用这个SDK来解析PDF文件的数据吧!!我猜的。。。。
Qt
读取
Pdf
文件Demo
Qt
使用mu
pdf
库读取
pdf
文件,并且
显示
到界面上,只是一个简单的Demo,介绍了库的使用。
Qt
使用mu
pdf
库读取
pdf
文件,并且
显示
到界面上,只是一个简单的Demo,介绍了库的使用。
Qt
使用mu
pdf
库读取
pdf
文件,并且
显示
到界面上,只是一个简单的Demo,介绍了库的使用。
qt
显示
pdf
poppler库
qt
中
显示
pdf
适合初级学习
QT
5生成
PDF
本方案采样
QT
5的Q
Pdf
Writer方式进行
pdf
的生成 该方案中包含
pdf
writer的两种实现方式。可在MainWindow中通过
pdf
Writer1()和
pdf
Writer2()进行切换。 1、
pdf
Writer1():使用Q
pdf
Writer和Qpainter进行纯文字版的
pdf
生成和绘制,并进行了分页
显示
。
Pdf
生成在当前目录下的
pdf
_test.
pdf
2、
pdf
Writer2():使用Q
Pdf
writer 和QPainter创建
pdf
报告,关键是对页面的布局排版。本示例,进行了页眉,页脚,中间内容的排版。页眉左上角为图片logo,页眉右边为页数提示;页脚有生成报告的时间和公司logo布局。 图像的缩放不采用scale,直接采用Rect来缩放,如缩小原图的一半,只需 image.width/2。
Pdf
生成在当前目录下的Report.
pdf
Qt
-
Pdf
预览示例-采用QPrintPreviewWidget
Qt
程序内预览
PDF
文件,不采用外部第三方库。仅使用
Qt
内置的QPrinter,QPrintPreviewWidget,QPainter 实现
pdf
文件预览功能。同时支持放大,缩小功能。程序效果预览见:https://blog.csdn.net/winstonyi/article/details/121656578
QT
C++ 中进行
PDF
显示
,以实现 使用
Qt
Pdium,将
PDF
页面呈现为 QImage
仅是在学习
QT
C++时没有找到适用于doc,docx,
pdf
的自带库 在网上查找资源后决定使用
Qt
Pdium。
Qt
Pdf
ium 是一个
Qt
模块,它使用 google 的
pdf
ium 项目呈现
PDF
文件。它将
PDF
页面呈现为 QImage。 由于本人项目是运行在Linux(Ubuntu)系统上,
QT
Creator版本为5.12.7 不包含该库,需要在项目中安装该库文件。
Qt
16,212
社区成员
26,592
社区内容
发帖
与我相关
我的任务
Qt
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
复制链接
扫一扫
分享
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章