Hi there, i've installed the WikiToPDF-Plugin from http://trac-hacks.org/changeset/latest/tracwikitopdfplugin?old_path=/&filename=tracwikitopdfplugin&format=zipon my trac 0.11.4 instance on ubuntu 8.04.2. It's a single instance running with apache2, no big thing. Trac project is located at /var/trac/wiki. I have copied the cover folder to /var/trac/wiki/cover. The parameter logoimage = /var/trac/wiki/htdocs/Header_image.png works fine.
Now i have some questions about the configuration of trac.ini, yellow marked, because images won't find their way to the pdf : [components] wikitopdf.* = enabled [wikitopdf] # base_dir is the Apache DocumentRoot, It is need to get PDF files with images. base_dir = /path/to/DocumentRoot # path to folder used to get a cover files. (key corrected from pathtocover to titlefile) titlefile = /path/to/cover # this are parameters functionality PDF links link = http://servername/trac-project folder_name = trac-project [wikitopdf-admin] # HTMLDOC options. See the link above. size = A4 right = 1.5cm left = 1.5cm top = 1.5cm bottom = 1.5cm no-links = None toctitle = Summary numbered = None linkstyle = plain header = l footer = .r1 logoimage = /var/trac/wiki/htdocs/Header_image.png [wikitopdf-page] # HTMLDOC options. See the link above. size = A4 right = 1.5cm left = 1.5cm top = 1.5cm bottom = 1.5cm no-links = None linkstyle = plain header = l footer = .r1 logoimage = /var/trac/wiki/htdocs/Header_image.png Trac.log show's some Informations which i can't figure out, i put three images on a wiki side (i killed the unimportant lines), the third image is not proper 'wiki'-coded (that's ok): 2009-03-03 17:59:47,993 Trac[wikitopdf] DEBUG: WikiToPdf => Start function wiki_to_pdf 2009-03-03 17:59:47,994 Trac[wikitopdf] DEBUG: WikiToPdf => Wiki intput for WikiToPdf: u' .... * 1.\r\n[[Image(wiki:TicketSystem:basic-workflow.png)]]\r\n\r\n * 2.\r\n[[Image(TicketSystem:basic-workflow.png)]]\r\n\r\n * 3.\r\n[[Image(basic-workflow.png)]]\r\n\r\n\r\n----...' 2009-03-03 17:59:47,996 Trac[api] DEBUG: Updating wiki page index 2009-03-03 17:59:48,034 Trac[formatter] DEBUG: Executing Wiki macro Image by provider <trac.wiki.macros.ImageMacro object at 0x8b9fd2c> 2009-03-03 17:59:48,038 Trac[formatter] DEBUG: Executing Wiki macro Image by provider <trac.wiki.macros.ImageMacro object at 0x8b9fd2c> 2009-03-03 17:59:48,040 Trac[formatter] DEBUG: Executing Wiki macro Image by provider <trac.wiki.macros.ImageMacro object at 0x8b9fd2c> 2009-03-03 17:59:48,041 Trac[formatter] ERROR: Macro Image(basic-workflow.png) failed: Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/wiki/formatter.py", line 480, in _macro_formatter return macro.process(args, in_paragraph=True) File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/wiki/formatter.py", line 180, in process text = self.processor(text) File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/wiki/formatter.py", line 167, in _macro_processor text) File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/wiki/macros.py", line 425, in expand_macro if attachment and 'ATTACHMENT_VIEW' in formatter.perm(attachment): File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/perm.py", line 524, in has_permission return self._has_permission(action, resource) File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/perm.py", line 538, in _has_permission check_permission(action, perm.username, resource, perm) File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/perm.py", line 433, in check_permission (username, action, resource)) File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/resource.py", line 111, in __repr__ return '<Resource %r>' % (', '.join(reversed(path))) TypeError: sequence item 0: expected string, NoneType found 2009-03-03 17:59:48,044 Trac[formatter] DEBUG: Executing Wiki macro Timestamp by provider <Timestamp.TimestampMacro object at 0x8b9fb2c> 2009-03-03 17:59:48,045 Trac[wikitopdf] DEBUG: WikiToPdf => HTML output for WikiToPdf in charset iso-8859-15 is: '<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/></head><body><p>\n<a class="wiki" href=" http://localhost/trac/wiki/WikiStart">...<li>1.\n</li></ul><p>\n<a style="padding:0; border:none" href="/trac/attachment/wiki/TicketSystem/basic-workflow.png"><img border="0" src="/trac/raw-attachment/trac/attachments/wiki/TicketSystem/basic-workflow.png" alt="Trac Ticket Workflow" title="Trac Ticket Workflow" /></a>\n</p>\n<ul><li>2.\n</li></ul><p>\n<a style="padding:0; border:none" href="/trac/attachment/wiki/TicketSystem/basic-workflow.png"><img border="0" src="/trac/raw-attachment/trac/attachments/wiki/TicketSystem/basic-workflow.png" alt="Trac Ticket Workflow" title="Trac Ticket Workflow" /></a>\n</p>\n<ul><li>3.\n</li></ul><p>\n<div class="system-message"><strong>Error: Macro Image(basic-workflow.png) failed</strong><pre>sequence item 0: expected string, NoneType found</pre></td></tr></table></div>\n</p>\n<hr />\n<p>...\n</p>\n</body></html>' 2009-03-03 17:59:48,046 Trac[wikitopdf] DEBUG: WikiToPdf => Finish function wiki_to_pdf 2009-03-03 17:59:48,046 Trac[wikitopdf] DEBUG: WikiToPdf => Start function html_to_pdf 2009-03-03 17:59:48,047 Trac[wikitopdf] DEBUG: WikiToPdf => Htmldoc command line: htmldoc --footer .r1 --right 1.5cm --no-links None --format pdf14 --webpage --top 1.5cm --charset iso-8859-15 --bottom 1.5cm --logoimage /var/trac/wiki/htdocs/Header_image.png --header l --left 1.5cm --linkstyle plain --size A4 /tmp/tmp1sVwmCwikitopdf -f /tmp/tmp8YTusZwikitopdf 2009-03-03 17:59:48,172 Trac[wikitopdf] DEBUG: WikiToPdf => Finish function html_to_pdf 2009-03-03 17:59:48,247 Trac[main] DEBUG: 394 unreachable objects found. As one can see the images 1 and 2 were processed the same way, image 3. throws an error, but none of the images are shown in the resulting pdf-file. I believe in that there is an issue with the path's in trac.ini or somewhere else. Is there somebody who can help? Thx Ice --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
