"Fossies" - the Fresh Open Source Software Archive

Member "xhtml2pdf-0.2.5/test/testBackground.py" (8 Aug 2018, 607 Bytes) of package /linux/www/xhtml2pdf-0.2.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # -*- coding: utf-8 -*-
    2 #############################################
    3 ## (C)opyright by Dirk Holtwick            ##
    4 ## All rights reserved                     ##
    5 #############################################
    6 
    7 __version__ = "$Revision: 176 $"
    8 __author__ = "$Author: kgrodzicki $"
    9 __date__ = "$Date: 2011-01-15 10:11:47 +0100 (Fr, 15 July 2011) $"
   10 
   11 """
   12 HTML/CSS to PDF converter
   13 Test background image generation on the `portrait` and `landscape`
   14 page.
   15 """
   16 
   17 from cookbook import html2pdf
   18 
   19 if __name__ == "__main__":
   20     xhtml = open('test-background-img.html')
   21     html2pdf(xhtml.read(), "testBackground.pdf")