wakaleo/jenkins-the-definitive-guide-book

The generated PDF does not display images

Opened this issue · 1 comments

Hello,

I managed to build the jenkins-the-definitive-guide.pdf document using Jenkins.
Unfortunately the generated *.pdf does not contain images, which are instead rendered correctly in the HTML version.

Here are the steps I performed (Jenkins ver 1.609.3 running inside a Docker container using https://github.com/jenkinsci/docker)

Jenkins Dashboard: New Item

  • Item name: jenkins-the-definitive-guide
  • Type: Freestyle project

Then click "OK"

Configure project

  • Project name: jenkins-the-definitive-guide
  • Source Code Management: Git
  • Build > Add build step
    • Invoke top-level Maven targets
      • Maven Version: Maven 3.3.3
      • Goals: package
  • Post-build Actions > Add post-build action
    • Archive the artifacts
      • Files to archive: **/target/*.jar,**/target/jenkins-the-definitive-guide.pdf
        then click "Save"

Jenkins Dashboard: Project "jenkins-the-definitive-guide" > Build Now

Excerpt from build console:

Started by user anonymous
Building in workspace /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/wakaleo/jenkins-the-definitive-guide-book.git # timeout=10
Fetching upstream changes from https://github.com/wakaleo/jenkins-the-definitive-guide-book.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress https://github.com/wakaleo/jenkins-the-definitive-guide-book.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 884b48cc22593cd353f364961a4a972fc3647e6c (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 884b48cc22593cd353f364961a4a972fc3647e6c
 > git rev-list 884b48cc22593cd353f364961a4a972fc3647e6c # timeout=10
[workspace] $ /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.3/bin/mvn package
[INFO] Scanning for projects...
...
Oct 12, 2015 9:56:22 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0201.pdf. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0201.pdf (See position 901:311)
Oct 12, 2015 9:56:22 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0202.pdf. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0202.pdf (See position 941:311)
Oct 12, 2015 9:56:22 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0203.pdf. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0203.pdf (See position 983:311)
...
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ hudsonbook-html ---
[INFO] Building jar: /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-html/target/hudsonbook-html-0.0.4-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Continuous Integration with Hudson ................. SUCCESS [  0.009 s]
[INFO] Continuous Integration with Hudson (Content) ....... SUCCESS [ 12.934 s]
[INFO] Continuous Integration with Hudson (French Content)  SUCCESS [ 11.151 s]
[INFO] Continuous Integration with Hudson (Content Chinese) SUCCESS [  4.004 s]
[INFO] Continuous Integration with Hudson (PDF) ........... SUCCESS [01:57 min]
[INFO] Continuous Integration with Hudson (HTML) .......... SUCCESS [02:03 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:29 min
[INFO] Finished at: 2015-10-12T21:58:33+00:00
[INFO] Final Memory: 88M/1510M
[INFO] ------------------------------------------------------------------------
Archiving artifacts
Finished: SUCCESS

Any help is really appreciated

Thanks -- Gianpaolo

The full console log is available at https://gist.github.com/gmacario/063ba6222dd3c52b337b