[Checkins] SVN: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/ demo app now converts the demo HTML file using all available converters

Andreas Jung andreas at andreas-jung.com
Sun Oct 5 02:39:13 EDT 2008


Log message for revision 91766:
  demo app now converts the demo HTML file using all available converters
  

Changed:
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/demo_app.py
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/resources/resources.ini

-=-
Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/demo_app.py
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/demo_app.py	2008-10-05 06:37:21 UTC (rev 91765)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/demo_app.py	2008-10-05 06:39:12 UTC (rev 91766)
@@ -30,17 +30,24 @@
     resources_configuration_file = os.path.join(os.path.dirname(__file__), 'resources', 'resources.ini')
     resources.registerResource(ITestContent, resources_configuration_file)
 
-    context = TestContent()
-    result = convert(context=context,
-                     html=html,
-                     aggregator_name='foo',
-                     styles=['fop_styles.css', 'demo_styles.css'],
-                     transformations=['zopyx.smartprintng.imageremover', 'zopyx.smartprintng.pagebreaker'],
-                     resource_name='demo',
-                     converter='pdf-prince',
-                     destination_filename='demo.pdf')
-    print 'Generated:', 
-    print os.path.abspath(result)
+    from zopyx.convert2.registry import availableConverters
 
+    for c in availableConverters():
+
+        print 'Converter: %s' % c
+        context = TestContent()
+        result = convert(context=context,
+                         html=html,
+                         aggregator_name='foo',
+                         styles=['fop_styles.css', 'demo_styles.css'],
+                         transformations=['zopyx.smartprintng.imageremover', 'zopyx.smartprintng.pagebreaker'],
+                         resource_name='demo',
+                         converter=c,
+                        )
+                        
+        print 'Generated:', os.path.abspath(result)
+        print
+
 if __name__ == '__main__':
+    import sys
     sys.exit(main())

Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/resources/resources.ini
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/resources/resources.ini	2008-10-05 06:37:21 UTC (rev 91765)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo/resources/resources.ini	2008-10-05 06:39:12 UTC (rev 91766)
@@ -1,5 +1,5 @@
 [demo]
-for-converter = pdf-fop, pdf-prince, fo
+for-converter = pdf-fop, pdf-prince, fo, odt-xfc, rtf-xfc, wml-xfc, ooxml-xfc, pdf-xinc
 description = Demo Demo Demo    
 template = demo_template.pt
 styles = fop_styles.css



More information about the Checkins mailing list