Python platform's excellent PDF report class library Reportlab. It does not belong to the Python standard class library, so you must manually download the class library package and install: http://www.reportlab.com/software/opensource/rl-toolkit/download/ zookeeper system and multiple-choice download, I went to the reportlab-2.6.win32-py2.7.exe because it involves converting the image to PDF, so also need Python imaging library: python Imaging Library: http://www.pythonware.com/products/pil/All our software requires Python (versions 2.4 through 2.7 supported; v2.6 is recommended if you're new to Python) If you want to use GIF or P NG images in your PDFs, you will also need to install the default size of the Python Imaging Library. Canvas is A4 #! /Usr/bin/env python #-*-coding: UTF-8-*-import osimport sysfrom reportlab. lib. pagesizes import A4, landscapefrom reportlab.pdf gen import canvas filename = '6598223154354374768.jpg 'fileExt = filename [: filename. rindex ('. ')] def convertpdf (): f_pdf = fileext0000''' (w, h) = landscape (A4) c = canvas. canvas (f_pdf, pagesize = landscape (A4) c. drawImage (filename, 0, 0, w, h) c. save () print "convert OK. "convertpdf ()