Bug 13767 - Creating PDF docs doesn't include image files
Summary: Creating PDF docs doesn't include image files
Status: RESOLVED OBSOLETE
Alias: None
Product: General Docs
Classification: Documentation
Component: docs-general (show other bugs)
Version: 3.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.3 M4
Assignee: Mark Morton
QA Contact:
URL:
Whiteboard: Backport to 3.0.3
Depends on:
Blocks:
 
Reported: 2020-01-31 12:57 UTC by Christian Lohr
Modified: 2021-04-22 13:43 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Generated PDF without images (583.56 KB, application/pdf)
2020-01-31 12:57 UTC, Christian Lohr
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lohr 2020-01-31 12:57:41 UTC
Created attachment 4626 [details]
Generated PDF without images

Operating System: Ubuntu 18.04
xsltproc in version 1.1.29-5ubuntu0.2
fop in version 2.1-7

I tried to generate the pdf docs of the overview-manual (but the problem exists for each manual). PDFs were created, but without images. Instead of the images, the was only whitespace.

The output of the make calls says the following:

[ERROR] FOUserAgent - Image not found. URI: figures/cross-development-toolchains.png. (No context info available)

[ERROR] FOUserAgent - Image not found. URI: figures/sdk-generation.png. (No context info available)

The generation of HTML files does work without any problems, and the files exist.

I appended the generated pdf (which is without any images)


Here's the complete output of the make call:
$ make pdf DOC=overview-manual
cd overview-manual; ../tools/poky-docbook-to-pdf overview-manual.xml ../template; cd ..
Note: namesp. cut : stripped namespace before processing           
            Yocto Project Overview and Concepts Manual
        
Making portrait pages on A4 paper (210mmx297mm)
Attributed 1612 IDs for element, cleaned up 0
[warning] /usr/bin/fop: JVM flavor 'sun' not understood
[INFO] FopConfParser - Default page-height set to: 11in
[INFO] FopConfParser - Default page-width set to: 8.26in
[ERROR] FOUserAgent - Image not found. URI: figures/overview-manual-title.png. (See position 2:48041)
[WARN] FOUserAgent - Font "Symbol,normal,700" not found. Substituting with "Symbol,normal,400".
[WARN] FOUserAgent - Font "ZapfDingbats,normal,700" not found. Substituting with "ZapfDingbats,normal,400".
[ERROR] FOUserAgent - Image not found. URI: figures/overview-manual-title.png. (No context info available)
[INFO] FOUserAgent - Rendered page #1.
[INFO] FOUserAgent - Rendered page #2.
[ERROR] FOUserAgent - Image not found. URI: figures/key-dev-elements.png. (See position 155:222)
[ERROR] FOUserAgent - Image not found. URI: figures/poky-reference-distribution.png. (See position 894:229)
[ERROR] FOUserAgent - Image not found. URI: figures/YP-flow-diagram.png. (See position 984:217)
[WARN] FOUserAgent - The contents of fo:external-graphic line 1 exceed the available area in the inline-progression direction by more than 50 points. (See position 155:222)
[WARN] FOUserAgent - Font "veramono,italic,400" not found. Substituting with "veramono,normal,400".
[WARN] FOUserAgent - The contents of fo:external-graphic line 2 exceed the available area in the inline-progression direction by more than 50 points. (See position 894:229)
[WARN] FOUserAgent - The contents of fo:block line 4 exceed the available area in the inline-progression direction by more than 50 points. (See position 979:829)
[ERROR] FOUserAgent - Image not found. URI: figures/key-dev-elements.png. (No context info available)
[INFO] FOUserAgent - Rendered page #3.
[INFO] FOUserAgent - Rendered page #4.
[INFO] FOUserAgent - Rendered page #5.
[INFO] FOUserAgent - Rendered page #6.
[ERROR] FOUserAgent - Image not found. URI: figures/poky-reference-distribution.png. (No context info available)
[INFO] FOUserAgent - Rendered page #7.
[ERROR] FOUserAgent - Image not found. URI: figures/YP-flow-diagram.png. (No context info available)
[INFO] FOUserAgent - Rendered page #8.
[INFO] FOUserAgent - Rendered page #9.
[ERROR] FOUserAgent - Image not found. URI: figures/source-repos.png. (See position 1359:179)
[ERROR] FOUserAgent - Image not found. URI: figures/index-downloads.png. (See position 1375:184)
[ERROR] FOUserAgent - Image not found. URI: figures/yp-download.png. (See position 1389:178)
[ERROR] FOUserAgent - Image not found. URI: figures/git-workflow.png. (See position 1476:169)
[INFO] FOUserAgent - Rendered page #10.
[INFO] FOUserAgent - Rendered page #11.
[INFO] FOUserAgent - Rendered page #12.
[ERROR] FOUserAgent - Image not found. URI: figures/index-downloads.png. (No context info available)
[ERROR] FOUserAgent - Image not found. URI: figures/yp-download.png. (No context info available)
[INFO] FOUserAgent - Rendered page #13.
[ERROR] FOUserAgent - Image not found. URI: figures/git-workflow.png. (No context info available)
[INFO] FOUserAgent - Rendered page #14.
[INFO] FOUserAgent - Rendered page #15.
[ERROR] FOUserAgent - Image not found. URI: figures/source-repos.png. (No context info available)
[INFO] FOUserAgent - Rendered page #16.
[INFO] FOUserAgent - Rendered page #17.
[INFO] FOUserAgent - Rendered page #18.
[INFO] FOUserAgent - Rendered page #19.
[INFO] FOUserAgent - Rendered page #20.
[ERROR] FOUserAgent - Image not found. URI: figures/YP-flow-diagram.png. (See position 2116:217)
[ERROR] FOUserAgent - Image not found. URI: figures/user-configuration.png. (See position 2166:187)
[ERROR] FOUserAgent - Image not found. URI: figures/layer-input.png. (See position 2427:178)
[ERROR] FOUserAgent - Image not found. URI: figures/source-input.png. (See position 2611:179)
[ERROR] FOUserAgent - Image not found. URI: figures/package-feeds.png. (See position 2696:180)
[ERROR] FOUserAgent - Image not found. URI: figures/source-fetching.png. (See position 2778:188)
[ERROR] FOUserAgent - Image not found. URI: figures/patching.png. (See position 2888:179)
[ERROR] FOUserAgent - Image not found. URI: figures/configuration-compile-autoreconf.png. (See position 2938:203)
[ERROR] FOUserAgent - Image not found. URI: figures/analysis-for-package-splitting.png. (See position 3011:201)
[ERROR] FOUserAgent - Image not found. URI: figures/image-generation.png. (See position 3111:191)
[ERROR] FOUserAgent - Image not found. URI: figures/sdk-generation.png. (See position 3258:186)
[ERROR] FOUserAgent - Image not found. URI: figures/images.png. (See position 3474:177)
[ERROR] FOUserAgent - Image not found. URI: figures/sdk.png. (See position 3559:173)
[ERROR] FOUserAgent - Image not found. URI: figures/cross-development-toolchains.png. (See position 3700:191)
[WARN] FOUserAgent - The contents of fo:external-graphic line 1 exceed the available area in the inline-progression direction by more than 50 points. (See position 2116:217)
[WARN] FOUserAgent - The contents of fo:external-graphic line 1 exceed the available area in the inline-progression direction by more than 50 points. (See position 2166:187)
[WARN] FOUserAgent - The contents of fo:external-graphic line 1 exceed the available area in the inline-progression direction by more than 50 points. (See position 2427:178)
[WARN] FOUserAgent - The contents of fo:external-graphic line 3 exceed the available area in the inline-progression direction by more than 50 points. (See position 2696:180)
[WARN] FOUserAgent - The contents of fo:external-graphic line 2 exceed the available area in the inline-progression direction by 16725 millipoints. (See position 2778:188)
[WARN] FOUserAgent - The contents of fo:external-graphic line 3 exceed the available area in the inline-progression direction by more than 50 points. (See position 2888:179)
[WARN] FOUserAgent - The contents of fo:external-graphic line 4 exceed the available area in the inline-progression direction by more than 50 points. (See position 2938:203)
[WARN] FOUserAgent - The contents of fo:external-graphic line 3 exceed the available area in the inline-progression direction by more than 50 points. (See position 3011:201)
[WARN] FOUserAgent - The contents of fo:external-graphic line 3 exceed the available area in the inline-progression direction by more than 50 points. (See position 3111:191)
[WARN] FOUserAgent - The contents of fo:external-graphic line 1 exceed the available area in the inline-progression direction by more than 50 points. (See position 3258:186)
[WARN] FOUserAgent - The contents of fo:external-graphic line 5 exceed the available area in the inline-progression direction by more than 50 points. (See position 3559:173)
[WARN] FOUserAgent - The contents of fo:external-graphic line 1 exceed the available area in the inline-progression direction by more than 50 points. (See position 3700:191)
[WARN] FOUserAgent - The contents of fo:block line 1 exceed the available area in the inline-progression direction by more than 50 points. (See position 3724:377)
[WARN] FOUserAgent - The contents of fo:block line 1 exceed the available area in the inline-progression direction by 20091 millipoints. (See position 4065:381)
[INFO] FOUserAgent - Rendered page #21.
[INFO] FOUserAgent - Rendered page #22.
[INFO] FOUserAgent - Rendered page #23.
[INFO] FOUserAgent - Rendered page #24.
[ERROR] FOUserAgent - Image not found. URI: figures/YP-flow-diagram.png. (No context info available)
[ERROR] FOUserAgent - Image not found. URI: figures/user-configuration.png. (No context info available)
[INFO] FOUserAgent - Rendered page #25.
[INFO] FOUserAgent - Rendered page #26.
[INFO] FOUserAgent - Rendered page #27.
[ERROR] FOUserAgent - Image not found. URI: figures/layer-input.png. (No context info available)
[INFO] FOUserAgent - Rendered page #28.
[INFO] FOUserAgent - Rendered page #29.
[INFO] FOUserAgent - Rendered page #30.
[ERROR] FOUserAgent - Image not found. URI: figures/source-input.png. (No context info available)
[INFO] FOUserAgent - Rendered page #31.
[INFO] FOUserAgent - Rendered page #32.
[ERROR] FOUserAgent - Image not found. URI: figures/package-feeds.png. (No context info available)
[INFO] FOUserAgent - Rendered page #33.
[INFO] FOUserAgent - Rendered page #34.
[ERROR] FOUserAgent - Image not found. URI: figures/source-fetching.png. (No context info available)
[INFO] FOUserAgent - Rendered page #35.
[INFO] FOUserAgent - Rendered page #36.
[ERROR] FOUserAgent - Image not found. URI: figures/patching.png. (No context info available)
[INFO] FOUserAgent - Rendered page #37.
[ERROR] FOUserAgent - Image not found. URI: figures/configuration-compile-autoreconf.png. (No context info available)
[INFO] FOUserAgent - Rendered page #38.
[INFO] FOUserAgent - Rendered page #39.
[ERROR] FOUserAgent - Image not found. URI: figures/analysis-for-package-splitting.png. (No context info available)
[INFO] FOUserAgent - Rendered page #40.
[INFO] FOUserAgent - Rendered page #41.
[ERROR] FOUserAgent - Image not found. URI: figures/image-generation.png. (No context info available)
[INFO] FOUserAgent - Rendered page #42.
[INFO] FOUserAgent - Rendered page #43.
[INFO] FOUserAgent - Rendered page #44.
[ERROR] FOUserAgent - Image not found. URI: figures/images.png. (No context info available)
[INFO] FOUserAgent - Rendered page #45.
[ERROR] FOUserAgent - Image not found. URI: figures/sdk.png. (No context info available)
[INFO] FOUserAgent - Rendered page #46.
[INFO] FOUserAgent - Rendered page #47.
[INFO] FOUserAgent - Rendered page #48.
[ERROR] FOUserAgent - Image not found. URI: figures/cross-development-toolchains.png. (No context info available)
[INFO] FOUserAgent - Rendered page #49.
[INFO] FOUserAgent - Rendered page #50.
[INFO] FOUserAgent - Rendered page #51.
[INFO] FOUserAgent - Rendered page #52.
[INFO] FOUserAgent - Rendered page #53.
[INFO] FOUserAgent - Rendered page #54.
[INFO] FOUserAgent - Rendered page #55.
[INFO] FOUserAgent - Rendered page #56.
[INFO] FOUserAgent - Rendered page #57.
[INFO] FOUserAgent - Rendered page #58.
[INFO] FOUserAgent - Rendered page #59.
[INFO] FOUserAgent - Rendered page #60.
[INFO] FOUserAgent - Rendered page #61.
[ERROR] FOUserAgent - Image not found. URI: figures/sdk-generation.png. (No context info available)
[INFO] FOUserAgent - Rendered page #62.
[INFO] FOUserAgent - Rendered page #63.

 #### Success! overview-manual.pdf ready. ####
Comment 1 Mark Morton 2020-05-06 09:20:40 UTC
May defer to possible Sphinx conversion to doc management
Comment 2 st.zarifakis 2020-08-06 07:07:55 UTC
Problem seems to be base directory. This is set in 
documentation/template/fop_config.xml to ../template. Therefore figures/*.png is not found, since the current directory is documentation/some-guide.

As a workaround for me I have added the following to the pdf target in the Makefile:

diff --git a/documentation/Makefile b/documentation/Makefile
index 15644bf926..2b1025b9b8 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -375,8 +375,10 @@ else ifeq ($(DOC),mega-manual)
 	@echo " "
 
 else
-
+	cd template; ln -s ../$(DOC)/figures; cd ..
 	cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd ..
+	cd template; rm figures; cd ..
+
 endif
 
 html:
Comment 3 Michael Opdenacker 2021-04-22 13:43:41 UTC
I no longer have the issue after the migration to Sphinx.
Running "make latexpdf" generates a perfectly good looking PDF document with the expected images.

Closing this bug.