[Checkins] SVN: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/ updated
Andreas Jung
andreas at andreas-jung.com
Mon Dec 29 11:01:04 EST 2008
Log message for revision 94423:
updated
Changed:
U zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/demo_app.py
A zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/background.png
A zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/flyer.html
U zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/resources.ini
-=-
Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/demo_app.py
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/demo_app.py 2008-12-29 15:33:38 UTC (rev 94422)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/demo_app.py 2008-12-29 16:01:03 UTC (rev 94423)
@@ -7,15 +7,35 @@
import os
+from zope.interface import implements, Interface
+# register resources directory for demo purposes
+from zopyx.smartprintng.core.highlevel import convert
+from zopyx.smartprintng.core import resources
+from zopyx.smartprintng.core.interfaces import IImageFetcher
+from zopyx.smartprintng.core.adapters import ExternalImageFetcher
+
package_home = os.path.dirname(__file__)
-
def demo_convert():
- from zopyx.smartprintng.core.highlevel import convert
+ from zope.app.testing import ztapi
- flyer = os.path.join(package_home, 'flyer.html')
- filename = convert(context=None, html=flyer, converter='pdf-prince')
+ class ITestContent(Interface):
+ pass
+
+ class TestContent(object):
+ implements(ITestContent)
+
+ try:
+ ztapi.provideAdapter(ITestContent, IImageFetcher, ExternalImageFetcher)
+ except:
+ pass
+
+ resources_configuration_file = os.path.join(os.path.dirname(__file__), 'resources', 'resources.ini')
+ resources.registerResource(ITestContent, resources_configuration_file)
+
+
+ filename = convert(context=TestContent(), html='', resource_name='demo', converter='pdf-prince')
return filename
if __name__ == '__main__':
Added: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/background.png
===================================================================
(Binary files differ)
Property changes on: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/background.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/flyer.html
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/flyer.html (rev 0)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/flyer.html 2008-12-29 16:01:03 UTC (rev 94423)
@@ -0,0 +1,298 @@
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+ @page {
+ size: a4 landscape;
+ margin: 0cm;
+ }
+
+ #page1 {
+ position: absolute;
+ margin-left: 0cm;
+ }
+ #page2 {
+ position: absolute;
+ margin-left: 10cm;
+ }
+ #page3 {
+ position: absolute;
+ margin-left: 20cm;
+ }
+
+ #img1 {
+ position: absolute;
+ margin-left: 0cm;
+ width: 30cm;
+ height: 21cm;
+ }
+
+ #img2 {
+ position: absolute;
+ margin-left: 10cm;
+ width: 10cm;
+ height: 21cm;
+ }
+
+ #img3 {
+ position: absolute;
+ margin-left: 20cm;
+ width: 10cm;
+ height: 21cm;
+ }
+
+ .slot {
+ font-family: "Arial Unicode MS";
+ font-size: 20px;
+ width: 10cm;
+ height: 21cm;
+ border: 1px dashed #666666;
+ }
+
+ .example {
+ margin-left: 5mm;
+ margin-right: 8mm;
+ padding-left: 3mm;
+
+ font-size: 10px;
+ border-left: 3px solid green;
+ }
+ .example h1 {
+ font-size: 15px;
+ text-align: left;
+ text-decoration: underline;
+ font-weight: bold;
+ }
+ .example h2 {
+ font-size: 13px;
+ text-align: left;
+ }
+
+ .example p {
+ text-align: justify;
+ }
+
+ #zopyx-logo {
+ width: 8cm;
+ text-align: center;
+ }
+
+ #technologies {
+ margin-top: 1cm;
+ column-count: 2;
+ column-fill:balance;
+ }
+ #technologies h2{
+ margin-top: 5px;
+ margin-bottom: 5px;
+ }
+
+ #technologies ul {
+ margin-bottom: 0;
+ }
+
+ #kontakt {
+ margin-top: 3.0cm;
+ font-weight: bold;
+ color: white;
+ font-size: 15px;
+ }
+
+ ul {
+ padding-left: 0.5cmcm;
+ }
+ li { margin-left: -1cm; padding-top: -0.5cm;}
+ li.inside { list-style-position: inside }
+ li.outside { list-style-position: outside }
+
+ #url {
+ padding-top: 1em;
+ }
+
+ #companies {
+ font-family: "Trebuchet MS";
+ position: absolute;
+ margin-top: 6cm;
+ text-align: center;
+ width: 100%;
+ }
+
+ #companies #headline {
+
+ font-weight: bold;
+ font-size: 40px;
+ padding-bottom: 1em;
+ }
+
+ </style>
+</head>
+<body>
+
+ <img id="img1" src="background.png" />
+
+ <div class="slot" id="page1">
+
+ <div id="companies">
+ <div id="headline">
+ ZOPYX & Friends
+ </div>
+
+ <div class="headline2">
+ Veit Schiele
+ </div>
+ <div class="headline2">
+ banality design & communication
+ </div>
+ <div class="headline2">
+ Zettwerk GmbH
+ </div>
+ <div class="headline2">
+ ZOPYX Ltd. & Co. KG
+ </div>
+ <div class="headline2" id="url">
+ www.zopyx-and-friends.com
+ </div>
+ </div>
+
+ </div>
+ <div class="slot" id="page2">
+
+ <div class="example" id="blabla">
+ <h1> Beratung für Python, Zope und Plone</h1>
+
+ <h2>Gute Worte, die bares Geld sparen</h2>
+ <p>
+ Im Vorfeld von IT-Entscheidungen kann Ihnen eine gute Beratung sehr viel Zeit, Geld und Ãrger ersparen. Insbesondere dann, wenn der Erfolg Ihres Unternehmens vom perfekten Funktionieren komplexer IT-Systeme abhängig ist, sollten Sie im Vorfeld einer Investition möglichst frühzeitig einen erfahrenen Experten zu Rate ziehen.
+ </p>
+
+ <p>
+ ZOPYX berät Sie plattform- und herstellerunabhängig während des gesamten Projektverlaufs, von der Planung und Entwicklung über das Deployment bis hin zur Betriebsphase. Das umfassende Know-how von ZOPYX gibt Ihnen die Sicherheit, in allen Phasen Ihres IT-Projekts die möglichen Optimierungspotenziale voll auszuschöpfen.
+ </p>
+
+ <p>
+ Besondere Expertise besitzt ZOPYX bei der Evaluierung heterogener IT-Architekturen und wenig gebräuchlicher Plattformen wie beispielsweise AIX oder FreeBSD.
+ </p>
+
+ </div>
+ <div class="example" id="technologies">
+
+ <h2>Programming languages:</h2>
+ <ul>
+ <li>
+ Python, C, C++, Shell, Javascript,</li>
+ <li>
+ SQL, PHP</li>
+ <li>
+ SGML, XML, DOM, SAX, XSL, XSLT, XSL-FO, XPATH etc.</li>
+ <li>
+ Java, JDBC, Servlets</li>
+ <li>
+ C, C++</li>
+ <li>
+ Middleware (ILU, CORBA)</li>
+ <li>
+ HTML, CSS</li>
+ </ul>
+ <h2>Databases:</h2>
+ <ul>
+ <li>
+ Oracle, MySQL, Postgres, ZODB</li>
+ </ul>
+ <h2>Tools:</h2>
+ <ul>
+ <li>
+ Apache, Squid, Pound</li>
+ <li>
+ Zope, CMF, Plone</li>
+ </ul>
+ <h2>Operating system:</h2>
+ <ul>
+ <li>
+ Unix, Linux, Solaris</li>
+ <li>
+ Windows</li>
+ </ul>
+ <h2>Applications server:</h2>
+ <ul>
+ <li>
+ Zope 2, PHP</li>
+ </ul>
+ <h2>Content-Management-Systems:</h2>
+ <ul>
+ <li>
+ Typo 3</li>
+ <li>
+ Zope</li>
+ <li>
+ Plone</li>
+ <li>
+ CPS</li>
+ </ul>
+ </div>
+
+ <div class="example" id="kontakt">
+ ZOPYX Ltd. & Co. KG
+ <br/>
+ D-72070 Tübingen
+ <br/> :w
+ Tel. +49-(0)7071-793257
+ <br/>
+ Fax. +49-(0)7071-7936840
+ <br/>
+ E-Mail. info at zopyx.com
+ <br/>
+ www.zopyx.com, www.zopyx.de
+
+ </div>
+ </div>
+ <div class="slot" id="page3">
+ <!--
+ <div class="example" id="spanish">
+ <h1>Spanish</h1>
+ <p>
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce augue dui, vulputate ac, bibendum at, cursus vitae, massa. Etiam nulla ipsum, tempus in, convallis accumsan, sollicitudin non, enim. Cras iaculis ligula a pede. Nulla facilisi. Etiam porttitor ornare elit. Nullam fringilla lacus a pede. Nullam erat enim, eleifend id, ultrices quis, pellentesque at, justo. Cras tempus nulla id arcu. Praesent cursus dapibus lectus. Nullam molestie feugiat augue.
+
+ </p>
+ </div>
+ -->
+
+
+ <div class="example" id="hebrew">
+ <h1>Hebrew</h1>
+ <p>
+×××× ××× ××¨× × ×¡×צ××××××× ×¢×× ××, ×××ש ×פ×× ×× ×¦×ק××פ××× ××× ×, ×רץ ×× ×××¨×¡× ×××ק×פ×××. ×××ר תקש×רת ××ת×××××× ×× × ××, ×ש×× ×ª××××¨× ×©×ª× ××. ××× ×ª×§×©×רת ××ס××ר×× ×ת, ק××× ×קר×× ×××פש×ת ××× ×¢×, ×¢××× ××ר××¢×× ×רפ×××××§× ×× ×××. ×× × ×××× ×ספצ×פ××× ××ת×××××× ×¢××. ×פש ××××× × ××× ××¡× ×ספצ×פ××× ×, ××ר ×ת×× ××××©× ××ש××× ×ת. ×××× ×××¢× ×ער××× ×× ×¢××, ×ת ×¢×× ×××ש ק×××× ×¦×¨×¤×ª×ת, ××¢×ר×ת ×××××ת ××¡×¤×¨× ×× ×¢× ×רץ. ×××¢× ××¢××¨× ××××¢×× ×× ××ר, ××ר ×¢× ××פ×× ××ס×ק×.
+
+ </p>
+ <p>
+××× ×¢× ×¡×¨××× ××¢×ר×ת ××× ××××××. ×ת ××ק××× ×××× ×ת פ×××ס×פ×× ×××, ×©× ××ת ×תר×× ×××תר. ש×××ת × ××ר×× ××× ×ת, ×¢× ×פש × ×¤×× ×××ק××× ×ª×××××××, ××× ×××× ×§××××ת ××. ס×ר ×××× ××× × ×××¨×¡× ××, ר×× ×¢× ×רצ×עת ××ק××××× ×××ק×פ×××, ×× ×קר×ת ×××× ×ת ×תש×××ת ×××. ×©× ×שר×× ×ª×¨××× ×קר. ×©×ª× ××× ×× ××ש××× ×××××ש×× ×©×, ×ש×× ××× ××¢ ק××ס××× ××ר ש×.
+ </p>
+
+ </div>
+
+ <div class="example" id="chinese">
+ <h1>
+å½å¡é¢åå
Œ
转å人åèµæºç¤¾ä¼ä¿éé¨çé¨é¨
+å
³äºä¿è¿ä»¥åä¸å¸¦å¨å°±ä¸å·¥ä½æ导æè§çéç¥
+ </h1>
+ <p>
+ ãæ导æè§ãæåºä¿è¿ä»¥åä¸å¸¦å¨å°±ä¸å·¥ä½éç¹æ¯ï¼åå°åºãåæå
³é¨é¨è¦ç´§å¯ç»åå°æ¹çä¼å¿äº§ä¸ãç¹è²ç»æµï¼ç¡®å®é¼å±åä¸ç产ä¸æ导ç®å½ï¼å¶å®æ¶ææ¿çï¼é¼å±åä¸è
è¿å
¥å½å®¶åå°æ¹ä¼å
åéç¹åå±çç§æåãèµæºç»¼åå©ç¨åãå³å¨å¯éåãåå¯äº§åå å·¥åãè´¸æä¿è¿åã社åºæå¡åã建çå³å¡ååä¿¡æ¯æå¡åç产ä¸æè¡ä¸ãé¼å±åæ¯æ个ä½ç§è¥çéå
¬æå¶ç»æµåä¸å°ä¼ä¸åå±ï¼æ©å¤§åä¸é¢åãéç¹æ导åä¿è¿é«æ ¡æ¯ä¸çã失ä¸äººååè¿ä¹¡åæ°å·¥åä¸ã积æéåæªæ½ä¿è¿åéå¤å转ä¸äººåãçå¦åå½äººåçåä¸ãåäºç¨3å°5å¹´çæ¶é´ï¼å®ç°å³å¨è
åä¸äººæ°åéè¿åä¸å¸¦å¨å°±ä¸äººæ°ç大å¹
å¢å ï¼åºæ¬å½¢æä¿è¿ä»¥åä¸å¸¦å¨å°±ä¸çæ¿çä½ç³»ï¼ä½¿æ´å¤æåä¸ææ¿ååä¸è½åçå³å¨è
æååä¸ã
+ </p>
+ </div>
+
+ <div class="example" id="esperanto">
+ <h1> Чайка ЮÑий ЯковлевиÑ</h1>
+ <h2>ÐенеÑалÑнÑй пÑокÑÑÐ¾Ñ Ð Ð¾ÑÑийÑкой ФедеÑаÑии</h2>
+ <p>
+«ÐÑнеÑний ÑÑаÑÑÑ, пеÑеÑÐµÐ½Ñ ÑÑнкÑий и кÑÑг полномоÑий пÑокÑÑаÑÑÑÑ Ð² Ñелом ÑооÑвеÑÑÑвÑÑÑ ÑÑоÑÑим пеÑед ней задаÑам и ÑеалиÑм ÑовÑеменного ÑÑапа ÑазвиÑÐ¸Ñ ÑоÑÑийÑкого обÑеÑÑва.
+ </p>
+
+ <p>
+Ðднако ÑÑо не знаÑиÑ, ÑÑо ÑиÑÑема оÑганов пÑокÑÑаÑÑÑÑ Ð½Ðµ нÑждаеÑÑÑ Ð² ÑовеÑÑенÑÑвовании. ÐеÑÑпоÑно, ÑÑо ÑилÑное ÑоÑÑийÑкое гоÑÑдаÑÑÑво должно имеÑÑ ÑилÑнÑÑ Ð¿ÑокÑÑаÑÑÑÑ. ÐÐ»Ñ ÑÑого она должна ÑазвиваÑÑÑÑ Ð¿Ñежде вÑего Ñ ÑÑеÑом иÑÑоÑиÑеÑкиÑ
ÑенноÑÑей и Ñ
ода поÑÑÑÐ¾ÐµÐ½Ð¸Ñ Ð¿Ñавового гоÑÑдаÑÑÑва».
+ </p>
+
+ </div>
+
+ </div>
+</body>
+</html>
Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/resources.ini
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/resources.ini 2008-12-29 15:33:38 UTC (rev 94422)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo3/resources/resources.ini 2008-12-29 16:01:03 UTC (rev 94423)
@@ -1,7 +1,7 @@
[demo]
for-converter = pdf-prince
description = Flyer demo
-template =
+template = flyer.html
styles =
More information about the Checkins
mailing list