This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: embedded image in RTF
- From: Nigel Hardy <nwh at aber dot ac dot uk>
- To: docbook at lists dot oasis-open dot org
- Date: Wed, 21 Aug 2002 18:21:06 +0100
- Subject: Re: DOCBOOK: embedded image in RTF
- References: <E17gicn-0002xV-00@ns.ice.mpg.de>
Stefan Kuhn wrote:
E17gicn-0002xV-00@ns.ice.mpg.de">
Hi all docbook-experts out there!
I'm creating rtf from docbook via the DSSSL stylesheets. It works very well,
except one point: The images are included only as paths, but I would like to
have them "embedded", i. e. contained in the rtf document. The whole thing is
done on a server, so it would be better just to send one document to users.
Can this be achieved somehow?
Thanks a lot for your answers
(joining the debate after it's finished)
I have just had to face this question for a project with automatically generated
documents later served on the web. I have handled it (for a windows platform)
by writing a Word macro to break the links and saving the file and then calling
Word with this macro on the rtf document from my makefile after the call
to jade. It's a pain - but automatic. Generating the rtf how we want it would
be better :-)
I append the few lines in case they are of help or in case any VB gurus can
improve on it for me. (Nothing magic about the g02006 names - it's just our
project code)
Nigel
==================================================================
The Visual basic code is:
Sub g02006clean()
'
' To ensure that the graphics specified in SGML docbook and added
by jade
' are stored inside the rtf file and are not relative links which
fail
' in many circumstances, including the web
' NwH 15-aug-2002
'
For Each s In ActiveDocument.InlineShapes
If s.Type = msoComment Then
'MsgBox "msoComment" & s.Type, vbOKOnly, "Found"
& i
s.LinkFormat.Update
s.LinkFormat.BreakLink
End If
Next s
ActiveDocument.Save
Application.Quit
End Sub
The command to call Word to do the job is then:
winword /mg02006clean doc.rtf
--
---------------------------------------------------------------------
Nigel Hardy Tel: +44 1970 622 434. http://users.aber.ac.uk/nwh/
Dept. Computer Sci, University of Wales, Aberystwyth, SY23 3DB, UK
Adran Cyfrifiadureg, Prifysgol Cymru, Aberystwyth, SY23 3DB, UK