Hi Sergiu,
Yes, of course you can use the {image} macro for the 1.0 syntax, or the image: syntax for
2.0 documents, if they are attached, but to save time the images were not attached. I
copied the folder with hundreds of files from knowledgeroot (where the images were) to the
xwiki folder and changed the URLs with an UltraEdit macro using regular expressions.
The point is then, that manually importing the files as attachments is the work that can,
in this case, be avoided. So the workaround is for external file references from, e.g.,
another system. It would be nice to be able to declare a folder in XE to be a resource
folder for those cases in which resources from other systems must be used. Or do you
already have such a facility?
Greetings,
Steven Calkins
-----Ursprüngliche Nachricht-----
Von: users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org] Im Auftrag von Sergiu
Dumitriu
Gesendet: Freitag, 28. August 2009 12:49
An: XWiki Users
Betreff: Re: [xwiki-users] A workaround for a PDF rendering problem
Steven Calkins wrote:
Dear XWiki users,
I just wanted to share a workaround for a PDF rendering problem. I was
copying and pasting html from a knowledgeroot system into xwiki. In
the process I was changing the image paths to relative URLs. Normally
nothing speaks against using the absolute URLs, but we may need to
move the wiki soon, so I decided that relative paths are better. They
display fine in Xwiki Enterprise, but then the disappointment came
when I tried the PDF print. The first image appeared but the following
were empty! So I needed an absolute path which I can change easily if we move the wiki.
I went into the xwiki/skins/Albatross/template directory to the the
xwikivars.vm file and added a variable of the form:
#set($domain = "http://domain:port") After adding it, I saved the
file, restarted Tomcat and tested by typing somewhere in a page "$domain".
That took care of it. The PDFs were just fine now. Now I can replace
the relative URL everywhere by "${domain}/[ here relative URL]". When
we move the wiki to another server it will work as soon as I make a
single change in the xwiki/skins/Albatross/template/xwikivars.vm file.
I am new at XWiki, so if anyone has a better solution I'd be very glad
to hear it.
If the images are attachments to the wiki, you can use the {image} macro for the 1.0
syntax, or the image: syntax for 2.0 documents.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users