You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 2002/08/29 12:11:53 UTC

New user: want checkbox in margin in PDF

Hiya.  Brand-new to FOP, so please be gentle.. :-)

I'm generating PDF, and I want to hang a checkbox (like an HTML
form checkbox) in the left margin of an fo:list-item-body object.
That is, to get an output effect something like this:

label    here is the body
         of the list item
         blah blah blah
    []   check if you like FOP

I've managed to get a checkbox-like effect with the following
code, but I can't place it where I want nor put text alongside
it:

<fo:table border-width="0.25mm" border-style="solid">
 <fo:table-column column-width="8pt" />
 <fo:table-body>
  <fo:table-row>
   <fo:table-cell><fo:block line-height="8pt">&#160;</fo:block></fo:table-cell>
  </fo:table-row>
 </fo:table-body>
</fo:table>

Any suggestions?

Naturally, I'm in a hurry. :-(  I never get to learn new technology at
leisure..

Thanks!
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

Re: New user: want checkbox in margin in PDF

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rodent of Unusual Size wrote:
> 
> I'm generating PDF, and I want to hang a checkbox (like an HTML
> form checkbox) in the left margin of an fo:list-item-body object.
> That is, to get an output effect something like this:
> 
> label    here is the body
>          of the list item
>          blah blah blah
>     []   check if you like FOP

I did this with a Dingbats glyph (thanks to Arved and someone not
on this list for that.  In case anyone's interested, I did it with:

<fo:list-item>
 <fo:list-item-label end-indent="2cm">
  <fo:block>label</fo:block>
 </fo:list-item-label>
 <fo:list-item-body start-indent="2cm" text-align="justify">
  <fo:block>here is the body</fo:block>
  <fo:block>of the list item</fo:block>
  <fo:list-block>
   <fo:list-item>
    <fo:list-item-label start-indent="15mm">
     <fo:block>
      <fo:inline font-family="ZapfDingbats">&#x2751;</fo:inline>
     </fo:block>
    </fo:list-item-label>
    <fo:list-item-body>
     <fo:block>check if you like FOP</fo:block>
    </fo:list-item-body>
   </fo:list-item>
  </fo:list-block>
 </fo:list-item-body>
</fo:list-item>

It works.  If there's a simpler way, I'm open to it..

Thanks, everyone!
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

Re: New user: want checkbox in margin in PDF

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Rodent of Unusual Size wrote:
> I'm generating PDF, and I want to hang a checkbox (like an HTML
> form checkbox) in the left margin of an fo:list-item-body object.

- Use an embedded SVG
- Use an external graphic
- Use the Checkbox Unicode character (requires font, don't
   ask where to get one)

J.Pietschmann