[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Generating SVG in PDF
On 01-11-12 9:44 PM, Dew, Simon wrote:
Hi Dave Sure, I use external SVG files all the time. The following code works for me: <fo:external-graphic src="url('images/external.svg')" content-height="1.72cm" content-width="3.92cm" content-type="content-type:image/svg+xml"/> Note the url('...') wrapper in src, I think xep requires this but fop doesn't. This works with fop 1.0 and xep 4.19 demo version. Simon Dew Technical Author | Stanley Security Solutions 1 Park Gate Close, Bredbury, Stockport SK6 2SZ, U.K. Simon.Dew@SBDInc.com | +44 (0) 161 406 3405 www.stanleysecuritysolutions.co.uk Registered Office: Stanley House, Bramble Road, Swindon Registered in England and Wales No. 181585 VAT No. 232 2446 95 On 01/11/2012 06:07, Xmplar wrote:Has anyone managed to produce PDFs with SVG files? I can only achieve this with fo:instream-foreign-object, even though it is apparently possible to use fo:external-graphicto refer to an external SVG (see “SVG Essentials”, O’Reilly). Using fo:external-graphic (or even background-image in fo:block) just gives me a little box with red cross and the SVG is not generated. I’m using XEP 4.21, Saxon 6.5.5. The markup that works is: <fo:blockxmlns:ex="http://www.renderx.com/XSL/Extensions" xmlns:xi="http://www.w3.org/2001/XInclude"span="all"background-color="#cc9933" border-top="1pt solid #ff0000"border-bottom="1pt solid #ff0000" border-left="0pt none #000000"border-right="0pt none #000000"margin-top="0mm" margin-bottom="3mm"margin-left="0mm"margin-right="0mm"padding-top="3mm" padding-bottom="3mm"padding-left="3mm"padding-right="3mm"background-repeat="no-repeat" background-image="url(images/Figure5-4.gif)"ex:background-content-width="170mm" background-position="50% 50%"><fo:instream-foreign-object><svgversion="1.1"id="Layer_1"xmlns="http://www.w3.org/2000/svg"xmlns:xlink="http://www.w3.org/1999/xlink"x="0px"y="0px" width="193.26px"height="163.26px"viewBox="0 0 193.26 163.26"enable-background="new 0 0 193.26 163.26"xml:space="preserve"transform="translate(0,100)"> <rectx="0.63"y="0.63"fill="#ffffff"fill-opacity="0.7"stroke="#000000"stroke-width="0.5"width="192"height="162"/> </svg></fo:instream-foreign-object><fo:block …. -- *Dave Gardiner*--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]