Pictures in running text
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 47
- Joined: Mon Apr 18, 2005 2:22 pm
Pictures in running text
Post by PeterRobertson »
I have a number of small icons (.gif) that I need to display in
running text. For example, If X and Y are two such icons, I want
my PDF output to look like:
Everything I have tried results in:
Does anyone have any suggestions?
running text. For example, If X and Y are two such icons, I want
my PDF output to look like:
Code: Select all
Press the button X to start and Y to stop.
Code: Select all
Press the button
X
to start and
Y
to stop.
-
- Posts: 44
- Joined: Tue May 25, 2004 2:27 pm
My guess is that you are mapping all images to the "graphic" element in the DocBook side (stage before the PDF transform). There are a couple DocBook options you can (or at least should be able to) use. Take a look at the DocBook specifications for "guiicon" and "inlinegraphic". That may be exactly what you want.
But, that means you'll probably have to define a special tag on the XML side and tinker with your XSL to transform it to the right DocBook tags. Once that's handled, it should in theory transform to the PDF the way you want. (I haven't looked at the FO part yet... there may be some 'gotchas' there)
I haven't tried this yet... I have the same complaint about the XML I'm transforming to PDF and hope to find the time soon to try this out.
Maybe this will get you started on solving the problem though?
Anyone else want to chime in with comments or suggestions?
But, that means you'll probably have to define a special tag on the XML side and tinker with your XSL to transform it to the right DocBook tags. Once that's handled, it should in theory transform to the PDF the way you want. (I haven't looked at the FO part yet... there may be some 'gotchas' there)
I haven't tried this yet... I have the same complaint about the XML I'm transforming to PDF and hope to find the time soon to try this out.
Maybe this will get you started on solving the problem though?
Anyone else want to chime in with comments or suggestions?
-
- Posts: 47
- Joined: Mon Apr 18, 2005 2:22 pm
Post by PeterRobertson »
guiicon was the first thing I tried, but it too puts the icon on a separate line 

-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
To display small icons in running text without breaking the line use guibutton with a nested inlinemediaobject like this:
Best regards,
Sorin
To display small icons in running text without breaking the line use guibutton with a nested inlinemediaobject like this:
Code: Select all
<guibutton>
<inlinemediaobject>
<imageobject>
<imagedata fileref="folder-name/icon-name.gif" format="GIF"/>
</imageobject>
</inlinemediaobject>
</guibutton>
Sorin
-
- Posts: 47
- Joined: Mon Apr 18, 2005 2:22 pm
Post by PeterRobertson »
Here is my XML file:
Ths PDF output it generates (using the standard Oxygen PDF options) looks like:
where X is my icon.
Any more ideas?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"C:\Program Files\Oxygen 5.\frameworks\docbook\dtd/docbookx.dtd" [
]>
<book>
<title>XXX</title>
<chapter><title>YYY</title>
<para>Here is a button,
<guibutton>
<inlinemediaobject>
<imageobject>
<imagedata fileref="Icon.gif" FORMAT="GIF"/>
</imageobject>
</inlinemediaobject>
</guibutton>, that appears in-line.
</para>
</chapter>
</book>
Code: Select all
Here is a button,
X
, that appears in-line.
Any more ideas?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Your sample document works for me
Please export the scenarios to a file (menu Options - Export transformation scenarios), send the result file, the DocBook document and the .gif icon at support at oxygenxml dot com and specify the name of the scenario that you used.
Best regards,
Sorin
Your sample document works for me

Best regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Just to note the conclusion - please make sure the width of the icon is not too large so that the FO processor must break the line because not all the text after the icon can be placed on the same line with the icon.
Best regards,
Sorin
Just to note the conclusion - please make sure the width of the icon is not too large so that the FO processor must break the line because not all the text after the icon can be placed on the same line with the icon.
Best regards,
Sorin
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service