Differences between revisions 1 and 2
Revision 1 as of 2005-04-09 06:08:44
Size: 677
Editor: hoxide
Comment:
Revision 2 as of 2005-04-09 06:13:42
Size: 829
Editor: hoxide
Comment:
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
 * 用于生成PDF文档  * 简述:用于生成PDF文档
 * 能力: 生成PDF文档, 合并PDF文档, 将HTML导入到PDF文档中.
Line 13: Line 14:
 * 更多例子: [http://phaseit.net/claird/comp.text.pdf/PDF.html]

含有章节索引的中文 文章模板

::-- hoxide [DateTime(2005-04-09T06:08:44Z)] TableOfContents

文本处理

ReportLab

   1 from reportlab.pdfgen import canvas
   2 from reportlab.lib.units import inch
   3 
   4 font = "Helvetica"
   5 font_size = 26
   6 text = "Hello, world"
   7 x = 5.0 * inch
   8 y = 8.0 * inch
   9 destination_file = "/tmp/first.pdf"
  10 
  11 my_canvas = canvas.Canvas(destination_file)
  12 my_canvas.setFont(font, font_size)
  13 my_canvas.drawRightString(x, y, text)
  14 my_canvas.save()

编译工具

请大家不断补充

PythonPackages (last edited 2009-12-25 07:11:12 by localhost)