[xep-support] How to use a fo:instream-foreign-object as a background-image ?
Kirch Fritz
Friedrich.Kirch at it2media.de
Mon Apr 16 07:14:51 PDT 2018
Hi,
My goal is to give a fo:block a colored gradient background.
instead of using the @background-image=.. attribute I want to use a fo:instream-foreign-object to specify a fo:block’s background
I tried this, but the fo:instream-foreign-object is not inside the fo:block.
<fo:block border="3pt solid blue" margin="3mm" background-color="yellow">
<fo:instream-foreign-object block-progression-dimension="0%" content-width="100%" content-height="scale-to-fit" scaling="non-uniform">
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" height="1in" width="8.5in">
<defs>
<linearGradient id="grad1" x1="100%" y1="0%" x2="0%" y2="0%">
<stop offset="0%" style="stop-color:rgb(255,255,0);stop-opacity:1" />
<stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:1" />
</linearGradient>
</defs>
<rect width="8.5in" height="1in" fill="url(#grad1)" />
</svg>
</fo:instream-foreign-object>
SOME TEXT INSIDE THE PARAGRAPH SOME TEXT INSIDE THE PARAGRAPH SOME TEXT INSIDE THE PARAGRAPH SOME TEXT INSIDE THE PARAGRAPH SOME TEXT INSIDE THE PARAGRAPH
</fo:block>
Using <fo:block @background-image=”a_svg_file.svg”> technique, I have to specify a real image file, but I cant do this, because I don’t know the colors of this svg-file in advance. The colors are coming from my xml-file.
Using <fo:block @background-image=”url(‘http:///a_url)”> technique, I have to presuppose, that there is a internet connection, which doesn’t reliably exist
Using <fo:block @background-color=”a_color”> technique, I can produce solid background color only. No gradients.
Using a multistep-technique i.e. First produce a SVG according to my xml and secondly produce the pdf using this SVG is not accepted. I want only one step
Do you have any ideas how to use a colored gradient as a fo:block’s background?
Kind regards
Friedrich Kirch
IT2media GmbH & Co KG
Nürnberg, Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20180416/d1b0424d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello_gradient_xep_support.PDF
Type: application/pdf
Size: 6699 bytes
Desc: hello_gradient_xep_support.PDF
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20180416/d1b0424d/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello_gradient_xep_support.fo
Type: application/octet-stream
Size: 1659 bytes
Desc: hello_gradient_xep_support.fo
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20180416/d1b0424d/attachment-0001.obj>
More information about the Xep-support
mailing list