Author: aheritier
Date: Sun Aug 14 18:08:23 2005
New Revision: 232683

URL: http://svn.apache.org/viewcvs?rev=232683&view=rev
Log:
- MPPDF-8 : Add support for external imaging libraries like jimi and jai to use 
PNG images in generated pdf files.
- Improve some documentations

Modified:
    maven/maven-1/plugins/trunk/pdf/plugin.jelly
    maven/maven-1/plugins/trunk/pdf/plugin.properties
    maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml
    maven/maven-1/plugins/trunk/pdf/xdocs/faq.fml
    maven/maven-1/plugins/trunk/pdf/xdocs/index.xml
    maven/maven-1/plugins/trunk/pdf/xdocs/properties.xml

Modified: maven/maven-1/plugins/trunk/pdf/plugin.jelly
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/plugin.jelly?rev=232683&r1=232682&r2=232683&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/pdf/plugin.jelly Sun Aug 14 18:08:23 2005
@@ -159,6 +159,9 @@
         <pathelement location="${plugin.getDependencyPath('fop')}"/>
         <pathelement location="${plugin.getDependencyPath('batik')}"/>
         <pathelement 
location="${plugin.getDependencyPath('avalon-framework')}"/>
+        <pathelement 
location="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.jar.jimi')}"/>
+        <pathelement 
location="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.jar.jaicore')}"/>
+        <pathelement 
location="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.jar.jaicodec')}"/>
       </classpath>
     </taskdef>
     <fop>

Modified: maven/maven-1/plugins/trunk/pdf/plugin.properties
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/plugin.properties?rev=232683&r1=232682&r2=232683&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/pdf/plugin.properties Sun Aug 14 18:08:23 2005
@@ -35,3 +35,10 @@
 #maven.pdf.cover.date=Not defined by default
 maven.pdf.projectLogo=${pom.logo}
 maven.pdf.companyLogo=${pom.organization.logo}
+
+# Jimi or Jai libraries used to generate PNG images
+# We use the same syntax as to override a dependency
+# Not defined by default
+#maven.jar.jimi=${maven.repo.local}/jimi/jars/jimi-X.Y.Z.jar
+#maven.jar.jaicore=${maven.repo.local}/jai/jars/jai_core-X.Y.Z.jar
+#maven.jar.jaicodec=${maven.repo.local}/jai/jars/jai_codec-X.Y.Z.jar
\ No newline at end of file

Modified: maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml?rev=232683&r1=232682&r2=232683&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml Sun Aug 14 18:08:23 2005
@@ -33,6 +33,7 @@
       <action dev="aheritier" type="fix" issue="MPPDF-32" due-to="Lukas 
Theussl">Cannot use SVG images. batik: java.lang.NoSuchMethodError.</action>
       <action dev="aheritier" type="fix" issue="MPPDF-31" due-to="Lukas 
Theussl">Can't insert the logo image described in the POM if its path begins 
with a slash (as it works for the xdoc plugin).</action>
       <action dev="aheritier" type="fix" issue="MPPDF-22" due-to="Lukas 
Theussl">Allow copy and paste from pdf to text editor.</action>
+      <action dev="aheritier" type="fix" issue="MPPDF-8" due-to="Fábio Franco 
Uechi">Add support for external imaging libraries like jimi and jai to use PNG 
images in generated pdf files.</action>
     </release>
     <release version="2.3" date="2005-06-16">
       <action dev="aheritier" type="update" issue="MPPDF-38">Use the ant task 
for the xsl transformation and remove xerces and xalan dependencies. People 
using java 5 will have to use this release with maven 1.1 or maven 1.0 with at 
the most the PDF plugin 2.2.X.</action>

Modified: maven/maven-1/plugins/trunk/pdf/xdocs/faq.fml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/xdocs/faq.fml?rev=232683&r1=232682&r2=232683&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/xdocs/faq.fml (original)
+++ maven/maven-1/plugins/trunk/pdf/xdocs/faq.fml Sun Aug 14 18:08:23 2005
@@ -22,18 +22,26 @@
     <faq id="how-use">
       <question>How do I use the PDF Plugin ?</question>
       <answer>
-        <ul>
-          <li>Firstly you must call the maven target <code>site</code> to 
generate all the xdocs files and the image ressources.</li>
-          <li>Then you can call the <code>pdf</code> target to generate the 
pdf documentation for your project.</li>
-        </ul>
+        <p>
+          <ul>
+            <li>Firstly you must call the maven target <code>site</code> to 
generate all the xdocs files and the image ressources.</li>
+            <li>Then you can call the <code>pdf</code> target to generate the 
pdf documentation for your project.</li>
+          </ul>
+        </p>
+        <p>To automate the pdf creation you can add a post goal to the site 
like this :</p>
+        <source><![CDATA[ 
+<postGoal name="site">
+  <attainGoal name="pdf"/>
+</postGoal>
+]]></source>
       </answer>
     </faq>
     <faq id="how-use-multiproject">
       <question>How do I use the PDF Plugin with a multiproject ?</question>
       <answer>
-      <p>To generate a PDF from documentations defined in several 
sub-projects, you must copy all the xdocs files from these projects.</p>
-      <p>Here is an example on how to do it :</p>
-     <source><![CDATA[ 
+        <p>To generate a PDF from documentations defined in several 
sub-projects, you must copy all the xdocs files from these projects.</p>
+        <p>Here is an example on how to do it :</p>
+        <source><![CDATA[ 
 <attainGoal name="multiproject:site"/>
 <maven:reactor 
   basedir="${basedir}" 
@@ -52,9 +60,28 @@
   </ant:copy>
 </j:forEach>
 <attainGoal name="pdf"/>
-]]></source>        
+]]></source>
+        <p>You can also createa dynamic menu using Velocity macro in your 
navigation.xml file. For example :</p>
+        <source><![CDATA[ 
+<project name="$pom.name">
+  <body>
+    <links/>
+    <menu name="Overview">
+        #if ($overviewPageCreate == "true" )
+        <item name="${overviewPageLinkTitle}" href="${overviewPageLink}.html"/>
+        #end
+    </menu>
+    <menu name="Sub-Projects">
+        #foreach ($reactorProject in $multiprojects)
+        <item name="$reactorProject.name" 
href="/${aggregateDir}${reactorProject.artifactId}/index.html"/>
+        <item name="$reactorProject.name test" 
href="/${aggregateDir}${reactorProject.artifactId}/test.html"/>
+        #end
+    </menu>
+  </body>
+</project>
+]]></source>
       </answer>
-    </faq>    
+    </faq>
     <faq id="how-images">
       <question>Which types of images can I use in my documents ?</question>
       <answer>
@@ -104,7 +131,7 @@
                 <a href="http://xml.apache.org/fop/graphics.html#png";>PNG</a> 
(Portable Network Graphic)</td>
               <td>bitmap</td>
               <td>
-                <a 
href="http://xml.apache.org/fop/graphics.html#jimi";>JIMI</a> or <a 
href="http://xml.apache.org/fop/graphics.html#jai";>JAI</a>
+                <a 
href="http://xml.apache.org/fop/graphics.html#jimi";>JIMI</a> (using the 
property <a href="properties.html">"maven.jar.jimi"</a>) or <a 
href="http://xml.apache.org/fop/graphics.html#jai";>JAI</a> (using properties <a 
href="properties.html">"maven.jar.jaicore" and "maven.jar.jaicodec"</a>)
               </td>
             </tr>
             <tr>
@@ -120,10 +147,30 @@
                 <a 
href="http://xml.apache.org/fop/graphics.html#tiff";>TIFF</a> (Tag Image Format 
File)</td>
               <td>bitmap</td>
               <td>
-                <a href="http://xml.apache.org/fop/graphics.html#native";>FOP 
native</a> or <a href="http://xml.apache.org/fop/graphics.html#jai";>JAI</a>, 
depending on the subformat. See <a 
href="http://xml.apache.org/fop/graphics.html#tiff";>TIFF</a> for more 
details.(JIMI also supports TIFF, but this has not been implemented within 
FOP).</td>
+                <a href="http://xml.apache.org/fop/graphics.html#native";>FOP 
native</a> or <a href="http://xml.apache.org/fop/graphics.html#jai";>JAI</a> 
(using properties <a href="properties.html">"maven.jar.jaicore" and 
"maven.jar.jaicodec"</a>), depending on the subformat. See <a 
href="http://xml.apache.org/fop/graphics.html#tiff";>TIFF</a> for more 
details.(JIMI also supports TIFF, but this has not been implemented within 
FOP).</td>
             </tr>
           </tbody>
         </table>
+      </answer>
+    </faq>
+    <faq id="how-png">
+      <question>How can I insert png images in my pdf ?</question>
+      <answer>
+        <p>You must download and put somewhere on your disk JAI or JIMI (on 
your repository is a good place for it).</p>
+        <p>Then you must register the one you installed with for JIMI :</p>
+        
<source>maven.jar.jimi=${maven.repo.local}/jimi/jars/jimi-X.Y.Z.jar</source>
+        <p>Or for JAI :</p>
+        
<source>maven.jar.jaicore=${maven.repo.local}/jai/jars/jai_core-X.Y.Z.jar
+maven.jar.jaicodec=${maven.repo.local}/jai/jars/jai_codec-X.Y.Z.jar</source>
+      </answer>
+    </faq>
+  </part>
+  <part id="technical">
+    <title>Technical questions</title>
+    <faq id="no-report">
+      <question>Why isn't there a pdf report ?</question>
+      <answer>
+        <p>Because reports are generated before the site copies resources like 
images and the order of reports depends of several parameters. We need that 
images and generated files are created before we launch the pdf creation. Thus 
it is not possible to create a pdf report because we can't call it at the end 
of the site generation process.</p>
       </answer>
     </faq>
   </part>

Modified: maven/maven-1/plugins/trunk/pdf/xdocs/index.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/xdocs/index.xml?rev=232683&r1=232682&r2=232683&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/xdocs/index.xml (original)
+++ maven/maven-1/plugins/trunk/pdf/xdocs/index.xml Sun Aug 14 18:08:23 2005
@@ -26,6 +26,7 @@
   <body>
     <section name="Maven PDF Plug-in">
       <p>This plug-in allows you to generate a PDF version of your project's 
documentation.</p>
+      <p>Take a look at <a href="goals.html">goals</a>, the <a 
href="properties.html">properties</a> and the <a href="faq.html">FAQ</a> to see 
how to use it.</p>
     </section>
     <section name="Known issues">
       <ul>

Modified: maven/maven-1/plugins/trunk/pdf/xdocs/properties.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/pdf/xdocs/properties.xml?rev=232683&r1=232682&r2=232683&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/pdf/xdocs/properties.xml Sun Aug 14 18:08:23 
2005
@@ -219,6 +219,22 @@
               <code>false</code>
             </td>
           </tr>
+          <tr>
+            <td width="25%">maven.jar.jimi</td>
+            <td>Jimi OR Jai libraries must be declared if you want to use PNG 
images in your pdf document. Jimi and Jai cannot be distributed via ibiblio, so 
you must add the path to one of these libraries in your project properties. For 
example : 
<code>maven.jar.jimi=${maven.repo.local}/jimi/jars/jimi-X.Y.Z.jar</code></td>
+            <td width="10%">Yes</td>
+            <td>
+              <code>Empty.</code>
+            </td>
+          </tr>
+          <tr>
+            <td width="25%">maven.jar.jaicore<br/>maven.jar.jaicodec</td>
+            <td>Jimi OR Jai libraries must be declared if you want to use PNG 
images in your pdf document. Jimi and Jai cannot be distributed via ibiblio, so 
you must add the path to one of these libraries in your project properties. For 
example : 
<br/><code>maven.jar.jaicore=${maven.repo.local}/jai/jars/jai_core-X.Y.Z.jar<br/>maven.jar.jaicodec=${maven.repo.local}/jai/jars/jai_codec-X.Y.Z.jar</code></td>
+            <td width="10%">Yes</td>
+            <td>
+              <code>Empty.</code>
+            </td>
+          </tr>
         </table>
       </subsection>
     </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to