Forum Bugs

Problem with empty div tag in newer version

mroeglin
In PrinceXML 13.5, I am having a problem with the format of the PDF when a <div> tag is empty. When I use a separate closing tag <div></div>, then the PDF format is ok. If I close the tag within the open tag <div />, the document gets ugly (sample13.pdf attached). In PrinceXML 10r7, the format of the PDF files were identical regardless where the tag was closed (sample10.pdf attached).

In my specific example below, the div tag is attempting to right-align some text. In the new version of PrinceXML, all text that follows <div class="div.rightaligned" /> is right aligned. This makes no sense since the formating is going beyond the scope of the tag.
  1. sample.HTML2.2 kB
  2. sample.css0.8 kB
  3. sample10.pdf24.1 kB
  4. sample13.pdf24.5 kB
mikeday
Empty div tags are only permissible in XML documents, not HTML documents. You can use "-i xml" if you want to treat the input as XML.