473,395 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

embedded SVG in FO

Hello

I am trying to draw a horizontal line in xsl-fo using svg. However, the
line appears a few units below the place where I want it to be. For
example in the following code, the line is drawn around 43mm from the
top, instead of at 40mm.

<fo:block-container position="absolute" left="10mm" top="40mm"
width="20.001mm"
height="0.169mm">
<fo:block>
<fo:instream-foreign-object content-width="20.001mm"
content-height="0.169mm">
<svg width="20.001mm" height="0.169mm">
<line x1="20.001mm" y1="0.085mm" x2="0.000mm" y2="0.085mm"
stroke-width="0.169mm" fill="none" stroke="rgb(0,0,0)"/>
</svg>
</fo:instream-foreign-object>
</fo:block>
</fo:block-container>

Zeb

Jul 20 '05 #1
1 1647
Your problem is in the line stacking. XSL-FO formatter stack all
inline elements (fo:instream-foreign-object is inline-level element)
into lines. Minimal line height is controled by several attributes
such as line-height, line-stacking-strategy and etc. And, typically,
for 10pt font minimal line height is 12pt or so. Thus, your SVG is
placed to the bottom of the line and it is lower than expected. To
avoid this you should specify font-size="0pt" and line-height="0pt".

I suggest using freeware Altsoft XSL-FO Debugger
(http://alt-soft.com/products_xsl-fo_debugger.jsp) to analyze your
output and find what causes unexpected spaces. It can paint line and
formatting objects bounding boxes. So you can see the structure of
your file.
Best regards,
Altsoft Xml2PDF Team
http://alt-soft.com/products_xml2pdf.jsp

je*************@gmail.com wrote in message news:<11**********************@f14g2000cwb.googleg roups.com>...
Hello

I am trying to draw a horizontal line in xsl-fo using svg. However, the
line appears a few units below the place where I want it to be. For
example in the following code, the line is drawn around 43mm from the
top, instead of at 40mm.

<fo:block-container position="absolute" left="10mm" top="40mm"
width="20.001mm"
height="0.169mm">
<fo:block>
<fo:instream-foreign-object content-width="20.001mm"
content-height="0.169mm">
<svg width="20.001mm" height="0.169mm">
<line x1="20.001mm" y1="0.085mm" x2="0.000mm" y2="0.085mm"
stroke-width="0.169mm" fill="none" stroke="rgb(0,0,0)"/>
</svg>
</fo:instream-foreign-object>
</fo:block>
</fo:block-container>

Zeb

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
11
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
8
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept...
0
by: Nick White [MSFT] | last post by:
Hello fellow Microsoft Windows Mobile and Embedded enthusiasts: I invite you to peruse the list below of upcoming technical chats and Webcasts offered by the Windows Mobile and Embedded Devices...
59
by: Jeff Bowden | last post by:
For ease of configuration and other reasons, I would like for my single-user GUI app to be able to use postgresql in-process as a library accessing a database created in the users home directory. ...
49
by: Alex Vinokur | last post by:
Are there any restrictions/problems for use of C++ STL in development in embedded systems? In particular: * Does STL require too much space/memory? * Is 'implementation of STL...
0
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard...
1
by: leeanngriego | last post by:
I have a client who has asked me to find him some solid up and coming embedded engineers. 2 to 3 years expereince with Embedded Linux, VxWorks, Nucleus or any other RTOS who has working in L2/L3...
20
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
There are a few guarantees I exploit in the C Standard. For instance, I might write (unsigned)-1 to get the maximum value for an unsigned integer. Also, I might rely on things such as: ...
30
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
Let's say we had a simple function for returning the amount of days in a month: unsigned DaysInMonth(unsigned const month) { switch (month) { case 8: case 3: case 5:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.