[Checkins] SVN: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/ updated

Andreas Jung andreas at andreas-jung.com
Sun Oct 19 06:02:04 EDT 2008


Log message for revision 92383:
  updated
  

Changed:
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/README.txt
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card.css
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt
  A   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/debug.css
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/resources.ini

-=-
Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/README.txt
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/README.txt	2008-10-19 09:51:30 UTC (rev 92382)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/README.txt	2008-10-19 10:02:03 UTC (rev 92383)
@@ -1,2 +1,4 @@
-A small demonstration showing  how to generate simple business cards
-as PDF (requires(!) PrinceXML).
+A small demonstration showing  how to generate simple business cards as PDF
+(requires(!) PrinceXML). In addition it generates two versions of a business
+card for each configured fullname: the standard one and one with tracing lines
+around the main DIV elements.

Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py	2008-10-19 09:51:30 UTC (rev 92382)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py	2008-10-19 10:02:03 UTC (rev 92383)
@@ -40,19 +40,22 @@
     from zopyx.convert2.registry import availableConverters
 
     for fullname in ('Andreas Jung', 'Heinz Becker', 'Hilde Becker'):
+        for debug in (False, True):
+            styles= debug and ['business_card.css', 'debug.css'] or ['business_card.css']
+            ext = debug and '_debug' or ''
 
-        context = TestContent()
-        result = convert(context=context,
-                         html='',
-                         styles=['business_card.css'],
-                         resource_name='demo',
-                         converter='pdf-prince',
-                         template_options=dict(fullname=fullname),
-                         destination_filename=os.path.join(os.getcwd(), '%s.pdf' % fullname),
-                        )
-                        
-        print 'Generated:', os.path.abspath(result)
-        print
+            context = TestContent()
+            result = convert(context=context,
+                             html='',
+                             styles=styles,
+                             resource_name='demo',
+                             converter='pdf-prince',
+                             template_options=dict(fullname=fullname),
+                             destination_filename=os.path.join(os.getcwd(), '%s%s.pdf' % (fullname, ext)),
+                            )
+                            
+            print 'Generated:', os.path.abspath(result)
+            print
 
 if __name__ == '__main__':
     import sys

Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card.css
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card.css	2008-10-19 09:51:30 UTC (rev 92382)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card.css	2008-10-19 10:02:03 UTC (rev 92383)
@@ -28,7 +28,7 @@
                 font-size: 9px;
                 margin-left: 40mm;
                 margin-top: 25mm;
-                height: 40mm;
+                height: 20mm;
                 width: 40mm;
             }
 

Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt	2008-10-19 09:51:30 UTC (rev 92382)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt	2008-10-19 10:02:03 UTC (rev 92383)
@@ -7,10 +7,10 @@
         </tal:loop>
     </head>
     <body>
-        <div id="logo">
+        <div class="block" id="logo">
             <img src="http://zopyx.com/test_resources/zopyx1.png" />
         </div>
-        <div id="desc">
+        <div class="block" id="desc">
             <ul>
                 <li>
             Python, Zope &amp; Plone
@@ -26,7 +26,7 @@
         </ul>
         </div>
             
-        <div id="address">
+        <div class="block" id="address">
             <span tal:replace="options/fullname | nothing">Andreas Jung</span>
             <br/>
             Charlottenstr. 37/1

Added: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/debug.css
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/debug.css	                        (rev 0)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/debug.css	2008-10-19 10:02:03 UTC (rev 92383)
@@ -0,0 +1,4 @@
+
+div.block {
+   border: 1px dashed #dddddd; 
+}

Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/resources.ini
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/resources.ini	2008-10-19 09:51:30 UTC (rev 92382)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/resources.ini	2008-10-19 10:02:03 UTC (rev 92383)
@@ -3,4 +3,5 @@
 description = Businesscard demo
 template = business_card_template.pt
 styles = business_card.css
+         debug.css
          



More information about the Checkins mailing list