The subject is over a year old, but as far as I know there is still no
release available with a solution for the Image inclusión in the automatic
PDF-document generation. 

Because I really needed a solution for this problem I created a
quick-and-dirty solution for the short term. The problem with reading images
from the site/resources/images directory is that iText  isn’t using the
relative paths correctly (classpath problem), you can solve this by adding
the path manually to Maven startup classpath  (I said it was quick and
dirty…)

 

Look up the following lines in MVN.bat and add the directories manually to
the classpath..

 

@REM Start MAVEN2

:runm2

%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath
./src/site/resources;%CLASSWORLDS_JAR%
"-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%"
org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%

if ERRORLEVEL 1 goto error

goto end

 

All images will be added without a problem and site/book generation works as
intended.

 

 

 

 

 

Reply via email to