Bug 23781 - problem with embedding svg into a fop:box
Summary: problem with embedding svg into a fop:box
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.5
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-13 15:14 UTC by heribert hanisch
Modified: 2012-04-01 13:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description heribert hanisch 2003-10-13 15:14:38 UTC
It is not possible to start a svg-graphic inside a fo:block at coordinate x=0, 
y=0.
there is always a small offset in y-direction (of about 1px).

here is an example. When zooming into the rendered pdf with Acrobat,
you will see, that the black triangle does not start where the block 
with red background color starts.


<?xml version="1.0" encoding="ISO-8859-1"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
     <fo:simple-page-master master-name="one_column" page-height="11.488mm" 
page-width="45.0mm" margin-top="0.0mm" margin-bottom="0.0mm" margin-
left="0.0mm" margin-right="0.0mm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="one_column">
    <fo:flow flow-name="xsl-region-body">
      <fo:block background-color="red"> 
 		<fo:instream-foreign-object>
		<svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="11.488mm" 
height="11.488mm">
		  <svg:title>triangle</svg:title>
   			<svg:g style="fill: #000000; stroke:#000000; stroke-
width:0.172">
			<svg:path d="M 0 0 L 16 16 L 0 32 z"/>
  			</svg:g> 
 		</svg:svg>
		</fo:instream-foreign-object>
    </fo:block>
     </fo:flow>
  </fo:page-sequence>
</fo:root>
Comment 1 Pascal Sancho 2007-11-20 00:45:37 UTC
this is due to stroke-width > 0: half of it is drawn outside the viewport.
viewport attribute should be added to svg element to extent viewport area.
Comment 2 Glenn Adams 2012-04-01 13:51:00 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs