0

I am converting an HTML String to xsl-fo and then outputting it as a PDF. I have several tables that are shown in the PDF and they are packed too closely due to a lack of CSS rules. I tried to specify my (very simple) CSS margin-bottom and border in the HTML style attribute, but it does not work. I think it doesn't work because there is no rule in the xsl-fo XSL stylesheet I am using to account for style. I am using the stylesheet found here. Does anyone know how to use HTML style attribute (or CSS rules) in an xsl-fo way? Links would be appreciated. I have worked with XSL in the past but I am rusty, and I'm somewhat confused because I'm going from XHTML->PDF now whereas in the past I've used XSL to go from XML->HTML.

KyleM
  • 4,445
  • 9
  • 46
  • 78
  • Can you show us code you've tried? – TddOrBust Feb 20 '13 at 04:27
  • @SteveoDevo I am not confident of the best way to approach the problem. I know how to match rules in XSL (somewhat) but I am not sure what kind of xsl-fo rules to use for going all the way from XHTML -> PDF. For example for my HTML style tag I have a margin-bottom, do I "map" that to a specific xsl-fo rule? What if I want to use a CSS stylesheet, can I do that or does it have to be inline in the – KyleM Feb 20 '13 at 04:46
  • @KyleM - Unless the XSLT that is doing the transform has specific handling of `style` attributes, it won't change anything in the XSL-FO. Have you tried modifying the XSLT to produce the needed fo output? – Daniel Haley Feb 20 '13 at 06:11

0 Answers0