Beispiel #1
0
def test_danish_characters():
    template_path = "plugins/tests/danske_tegn_fejl.html"
    fields = {
        'afsender_adresse': u'Blåbærgrød',
        'date': '13-03-33',
        'count': '42'
    }
    output_path = 'plugins/tests/pdf1a_output.pdf'
    test_plugin(XHTMLPlugin(), template_path, fields, output_path, as_pdf=True)
Beispiel #2
0
def test_plugin_defs():
    pdf_plugin = PDFPlugin()
    odf_plugin = ODFPlugin()
    ooxml_plugin = OOXMLPlugin()
    xhtml_plugin = XHTMLPlugin()

    print pdf_plugin
    print odf_plugin
    print ooxml_plugin
    print xhtml_plugin
Beispiel #3
0
def test_xhtml_image_example_plugin(type="png", resolusion=48):
    template_path = "plugins/tests/xhtml_template.html"
    fields = {
        'ceo_first_name': 'Carsten',
        'ceo_last_name': 'Agger',
        'date': '13-03-33',
        'count': '42'
    }
    output_path = 'plugins/tests/pdf1a_output.pdf'
    test_plugin(XHTMLPlugin(), template_path, output_path, resolusion, type)
Beispiel #4
0
def test_xhtml_plugin_with_fo_file():
    print "TESTING GENERATION FROM FO FILE:"
    template_path = "plugins/tests/xhtml_template.fo"
    fields = {
        'ceo_first_name': 'Carsten',
        'ceo_last_name': 'Agger',
        'date': '13-03-33',
        'count': '42'
    }
    output_path = 'plugins/tests/pdf1a_output.pdf'
    test_plugin(XHTMLPlugin(), template_path, fields, output_path, as_pdf=True)
Beispiel #5
0
def test_xhtml_plugin():
    print "TESTING XHTML PLUGIN:"
    template_path = "plugins/tests/xhtml_template.html"
    fields = {
        'ceo_first_name': 'Carsten',
        'ceo_last_name': 'Agger',
        'date': '13-03-33',
        'count': '42'
    }
    output_path = 'plugins/tests/pdf1a_output.pdf'
    test_plugin(XHTMLPlugin(), template_path, fields, output_path, as_pdf=True)
Beispiel #6
0
def test_xhtml_image_preview_plugin(return_format="png", resolusion=48):
    print "TESTING IMG: " + return_format
    template_path = "plugins/tests/xhtml_template.html"
    fields = {
        'ceo_first_name': 'Carsten',
        'ceo_last_name': 'Agger',
        'date': '13-03-33',
        'count': '42'
    }
    output_path = 'plugins/tests/pdf1a_output.png'
    test_image_preview_plugin(XHTMLPlugin(), template_path, output_path,
                              fields, return_format, resolusion)
Beispiel #7
0
def test_xsl_fo_generation():
    print "TESTING FO FILE:"
    template_path = "plugins/tests/xhtml_template.html"
    fo_file = "plugins/tests/xhtml_template.fo"
    test_xsl_fo_plugin(XHTMLPlugin(), template_path, fo_file)