2013-08-02 116 views

回答

2

當然,soultion是在這裏(上python-poppler的-qt4的是一個Python結合poppler的PDF庫):

使用的樣本:

import sys 

from PyQt4.QtCore import * 
from PyQt4.QtGui import * 
import QtPoppler 
from pictureflow import * 

app = QApplication(sys.argv) 

w = PictureFlow() 
d = QtPoppler.Poppler.Document.load('file.pdf') 
d.setRenderHint(QtPoppler.Poppler.Document.Antialiasing and QtPoppler.Poppler.Document.TextAntialiasing) 

page = 0 
pages = d.numPages() - 1 
while page < pages: 
    page += 1 
    print page 
    w.addSlide(d.page(page).renderToImage()) 
w.show() 

sys.exit(app.exec_()) 
+0

只有如果OP的工作與GPL兼容:根據維基百科,poppler是GPL。 – AlexVhr

相關問題