1

I use asciidoc and the fopub backend to generate the docs for Codename One. The HTML generation is pretty easy but when I do the PDF generation I can't wrap image text properly.

The float attribute and hint for asciidoc is only supported for HTML output. The align attribute works great with the fop/docbook backend but doesn't let the text wrap around the image as the float argument does.

Is there a way to do the text wrapping that will work with the fop PDF output?

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • 1
    Can you flesh out your question a bit? Are you generating PDF from XSL-FO? Are you asking about an XSL-FO attribute that wraps text around an image? – Mathias Müller Jan 24 '16 at 13:25
  • I use asciidoc, sorry I wrote itin the title but not in the body which I should have done too. – Shai Almog Jan 24 '16 at 13:37
  • 1
    You'd probably have to hack the FO stylesheet. To my knowledge there isn't an attribute or way to do this w/o having to muck with the stylesheet. – LightGuard Jan 25 '16 at 15:16
  • @LightGuard would that apply to all images or can I set it to specific ones? Do you have a reference on how to do something like that? Thanks! – Shai Almog Jan 25 '16 at 17:30
  • 1
    Unfortunately I've not done the customization myself, you're probably better off to ask the asciidoctor mailing list for specifics. – LightGuard Jan 25 '16 at 17:36

2 Answers2

1

I'm not deeply familiar with asciidoc but I think the problem is in FOP based on the answers here: Block Image Right and Flow Text Around It?

Without that asciidoc can't even begin to wrap around an image with the fop backend.

Community
  • 1
  • 1
Derek Johnson
  • 812
  • 5
  • 6
  • Not exactly the answer I was hoping for but after quite a few days with no interest I'm guessing this makes sense. – Shai Almog Jan 31 '16 at 10:13
  • @ShaiAlmog Did this answer allowed you to warap text around image using asciidoc-fopub ? If yes could you detail how ? – user1767316 Feb 04 '22 at 20:19
  • Nope. I wasn't able to do that which is pretty darn frustrating. Ended up going with asciidocpdf – Shai Almog Feb 05 '22 at 06:14
1

Apache FOP 2.0 new features include some support for floats:

Floats (fo:float) are supported with some limitations:

  • the "clear" fo:float attribute is ignored; only the float attribute (left or right) is used overlapping of floats in the Y is not handled (even in the case there would not be overlap in the X direction)
  • floats that extend beyond the body region are not properly handled and will overflow past the edge of the region if a float extends to bottom of the body region and there are footnotes in the page the float may overlap with the footnote region
  • floats next to a table are not supported unless the start and end of the table happens in between the start and end of the float

So it seems that now is only about getting proper DocBook floats from AsciiDoc.

Community
  • 1
  • 1
Diego V
  • 6,189
  • 7
  • 40
  • 45