I'm currently drawing lines with xslfo code programatically, so yes I do
it with absolute positioning and it may be difficult to do if you need
to print something without absolute positioning.  I had started out
trying to set a border on a block to draw a line and ended up drawing
the block as such.
     <fo:block-container>
          <xsl:attribute name="position">absolute</xsl:attribute>
          <xsl:attribute name="background-color">black</xsl:attribute>
          <xsl:attribute name="padding-top">0px</xsl:attribute>
          <xsl:attribute name="padding-bottom">0px</xsl:attribute>
          <xsl:attribute name="padding-left">0px</xsl:attribute>
          <xsl:attribute name="padding-right">0px</xsl:attribute>
          <fo:block>
               <xsl:attribute name="line-height">0</xsl:attribute>
               <xsl:attribute
name="linefeed-treatment">preserve</xsl:attribute>
          </fo:block>
     </fo:block-container>
Then of course I set the left, top, width, and height attributes to tell
it where to draw.
 

-----Original Message-----
From: Fredrik Bengtsson [mailto:fredrik.bengts...@lemontree.se] 
Sent: Monday, May 02, 2011 3:57 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Change bars

You mean absolutely positioned AT blocks, not fo:blocks? Right, I
thought I'd do something like that. It'd be hard to solve at the FO
level at any rate, for corner cases like tables, indented/nested blocks
or variablelists.

Do you mean that this is a sort of confirmation of the proposed method,
that you are doing something similar? I tried just blindly adding a new
attribute to my FO blocks but FOP-trunk choked on that because it did
not recognize the foreign attributes. So I assume I'll have to handle
them somehow specially? I seem to remember an old mail discussion that
mentioned using ID attributes, maybe that is a way forward?

Has anybody else experimented with having custom information fall
through to the intermediate formats in general?

/F

-----Original Message-----
From: Eric Douglas [mailto:edoug...@blockhouse.com]
Sent: Monday, May 02, 2011 5:49 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Change bars

If you're just trying to draw lines you can do what I do.
Currently I'm using empty block tags with border attributes.
When I get around to rewriting it I want to use actual SVG line drawing
commands.
 

-----Original Message-----
From: Fredrik Bengtsson [mailto:fredrik.bengts...@lemontree.se]
Sent: Sunday, May 01, 2011 4:53 PM
To: fop-users@xmlgraphics.apache.org
Subject: Change bars

Hey,

I'm trying to make a workaround for the lack of change bar support in
FOP. I was thinking about making a two-pass solution that analyzes the
area tree and adds additional content where necessary. I have really
modest needs so maybe that could be workable.

 * No nesting, only one class
 * Just thin simple black lines, ok if they overlap since that won't be
visible
 * Always positioned on the exact same x-position relative to the left
page margin
 * Just apply on entire building blocks (such as paragraphs, a title
etc)

However, that would need some form of tagging in the AT, that is lifted
from the transform stage. That is, ideally I'd like to be able to add a
myns:changed="true" attribute to my input docbook blocks, and that would
result in <block> elements in the AT that are decorated in such a way
that I can pick it up.

I can't just add a border-left at the fo level though, because the
changed blocks might be part of a variable list or other types of
elements that aren't flush with the left edge.

Has anybody done something like this? Does it sound silly? Any other
suggestions for workarounds?

Regards,
/Fredrik


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to