changeset 551:025a4f729389

macro.pdf2svg: unified link to pdf file
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 28 Feb 2011 11:05:52 +0100
parents f927d699ca0e
children d30ae1dca471
files data/plugin/macro/pdf2svg.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/macro/pdf2svg.py	Mon Feb 28 10:47:06 2011 +0100
+++ b/data/plugin/macro/pdf2svg.py	Mon Feb 28 11:05:52 2011 +0100
@@ -125,12 +125,10 @@
             parser = Parser("##\n", request)
             m = _macro.Macro(parser)
             html_object = m.execute('EmbedObject', u'width=%s, height=%s, target=%s, url_mimetype=%s' % (width, height, cache_url, content_type))
-            if not url:
+            if attachment:
                 url = AttachFile.getAttachUrl(pagename, attachment, request, addts=0, do='get')
-                name = attachment
-                return '<B>Preview for:</B> "<a href=%s>%s</a>"<hr>%s<br>' % (url, name, html_object)
+                return '<B>SVG Image from:</B> "<a href=%s>%s</a>"<hr>%s<br>' % (url, attachment, html_object)
             else:
-                name = url
-                return '<B>Converted from:</B> "<a href=%s>%s</a>" <b>to SVG</b><hr>%s<br>' % (url, name, html_object)
+                return '<B>SVG Image from:</B> "<a href=%s>%s</a>"<hr>%s<br>' % (url, url, html_object)
         else:
              return ""