Dear FOP List Members,
> I am having trouble combining external-graphics and SVG graphics in FOP. > > I would like to use SVG to open a viewport containing both svg graphics > and external-graphics [gifs, jpgs, pngs] . > If I format the raster images in a typical manner, as > fo:external-graphics, fop generates PDFs with rasters fine. > > If I format svg images in a typical manner fo:instream-foreign-object, fop > generates PDF w/ svg fine. > > But if I try to combine them, FOP will not render the raster images. I am > trying to use svg to create a line pointing from one raster image to > another. I would like place several raster images and several SVG elements > into one viewport so that I can position them reliably. Neither the svg > examples nor the images examples shows how to combine svg and > external-graphics. Can anybody help me with this? > > Here is the code of what I would LIKE to do: > <fo:block space-before.optimum="10pt" space-after.optimum="30pt" > keep-with-previous="1"> > <!-- the next line, creating raster image, works OK, but its > position vis-a-vis the svg does not work in my situation --> > <fo:external-graphic height="75px" width="40px" x="240" y="240" > src="images/4.jpg"/> > <fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg"> > <svg:svg width="1000" height="760"> > <!-- the next lines, creating raster images, do not work --> > <fo:external-graphic src="images\4.jpg" x="240" y="240" > width="42px" height="98px"/> > <fo:external-graphic src="images\Image1.gif" x="320" y="240" > width="461px" height="377px"/> > <!-- the next lines, creating svg image, works fine --> > <svg:g style="fill:none; stroke:#ff0000; stroke-width:3px"> > <svg:line x1="280" y1="270" x2="400" y2="276"/> > </svg:g> > </svg:svg> > </fo:instream-foreign-object> > </fo:block> > > Thanks! > > Fred Evers >
