views:

312

answers:

2

Hi,

is there a possibility to include images into a docbook manual compiled by phpDocumentor?

I tried both:

<mediaobject>
 <imageobject>
  <imagedata fileref="payment_flowchart.png" format="png"/> 
 </imageobject>
</mediaobject>

and:

<figure><title>foo</title>
 <graphic fileref="payment_flowchart.png"/>
</figure>

Then again the image paths I tried might not have been what phpDocumentor expected, but I don't know where to put them anyway really.

Maybe someone has tried it before and had more success?

UPDATE

Current non-working approach:

<refentry id="{@id}">
 <refnamediv>
  <refname>Company_Payment</refname>
 </refnamediv>
 <refsynopsisdiv>
  <author>
   Company
   <authorblurb>
    {@link mailto:[email protected] André Hoffmann}
   </authorblurb>
  </author>
 </refsynopsisdiv>
 {@toc}
 <refsect1 id="{@id about}">
  <title>About</title>
  <para>
   text
   <imagedata fileref="/Users/andre/Zend/workspaces/DefaultWorkspace7/payment/doc/tutorials/company/payment_flowchart.png" format="PNG"/> 
  </para>
  <imagedata fileref="/Users/andre/Zend/workspaces/DefaultWorkspace7/payment/doc/tutorials/company/payment_flowchart.png" format="PNG"/> 
<mediaobject>
    <imageobject>
    <imagedata fileref="/Users/andre/Zend/workspaces/DefaultWorkspace7/payment/doc/tutorials/company/payment_flowchart.png" format="PNG"/> 
    </imageobject>
</mediaobject>
    <figure><title>foo</title>
     <graphic srccredit="Norman Walsh, 1998" fileref="/Users/andre/Zend/workspaces/DefaultWorkspace7/payment/doc/tutorials/company/payment_flowchart.png"/>
    </figure>
 </refsect1>
...
A: 

I think they fixed this in 1.3.0 using the <graphic/> tag. What version are you running?

Phill Pafford
I'm using version 1.4.1. The one that comes with Zend Studio for Eclipse 7.0
André Hoffmann
After looking at documentation for both it looks like you doing things correctly. I did notice that the format="png" had the png in uppercase like this: format="PNG" don't know if this make a difference.http://www.docbook.org/tdg5/en/html/imageobject.html
Phill Pafford
I tried writing it in uppercase, but it doesn't show up either. Btw.: I also tried specifing an absolute path.
André Hoffmann
Could you try the imagedata tag without the wrapper tags? Wondering if there is some sort of conflict that way?
Phill Pafford
Unfortunately that doesn't work either. I copied more or less the full source I'm using, so that you can see the context.
André Hoffmann
Don't know if this will help but I did find something:http://manual.phpdoc.org/HTMLSmartyConverter/HandS/Smarty/plugins/_PEAR---PhpDocumentor---phpDocumentor---Smarty-2.6.0---libs---plugins---function.html_image.php.html
Phill Pafford
The link you posted is the API documentation of a smarty function that creates HTML code for a image. I don't see how this could help me? As I can't use smarty in docbook.
André Hoffmann
A: 

I had some success but only after I dropped the srccredit attribute. Wrapping the tag in with a didn't make a bit of difference.

Simply:

<graphic fileref="/images/logo.png" />
Nev Stokes