Forum Bugs

Bad table misalignment in rendered PDF

CsKwg
Hello!

we are noticing misalignments in the rendered PDF for tables.

Price Version:
Prince 16.1
Copyright 2002-2025 YesLogic Pty. Ltd.
Desktop License


After many tests we could see that one reason for the misalignment are " " entities in the HTML markup.
So we removed these by using a custom program.

But some misalignments remain.
They seem to be related to umlauts, or general HTML entities, like "ü", in the markup.
But switching from entities ("Kältemaschine") to plain Unicode ("Kältemaschine") also does not remove all misalignments.

Attached I'm sending the following sample files:

260118-nb-1.png: NBSP within text
260118-nb-5.png: NBSP within text
260118-test-2.png: large misalignment to the left.
260119-euro-2.png: Euro followed by NBSP.
260121-htm-de.png: German example in HTML.
260121-htm-en.png: English example in HTML.
260121-pdf-de.png: German example in PDF.
260121-pdf-en.png: English example in PDF, NO misalignment.
260121-pdf-en-2.png: English with entities in PDF, BAD misalignment.
content25.css: the CSS file.


The general structure of all affected tables is like this:

			<table class="prodTable">
				<tbody>
					<tr>
						<td class="u1">Item 1)</td>
						<td class="u2" colspan="4">
							<p><strong>Annual service of the cooling system(s) including the refrigeration unit(s)</strong></p>
							<p>in accordance with Service Contract No. W- dated</p>
							<p>&nbsp;</p>
						</td>
					</tr>
					<tr>
						<td class="u6" colspan="2">Price:</td>
						<td class="u7">&nbsp;</td>
						<td class="u8"><strong>Euro</strong></td>
						<td class="u9"><strong>0.0</strong></td>
					</tr>
				</tbody>
			</table>


The misalignment always Is visible in the TD with the "U8" class.
But all table cells in the same row are affected.

The following styles are being used:

/* Unit Price */
.prodTable td.u1 {
	width: 23mm;
}

.prodTable td.u2 {
	width: 148mm;
}
/* Unit Price Sum */
.prodTable td.u6 {
	width: auto;
}

.prodTable td.u7 {
	width: 16mm;
}

.prodTable td.u8 {
	width: 12mm;
	text-align: left;
}

.prodTable td.u9 {
	width: 20mm;
	text-align: right;
}



Kind regards
Karl-W.Geitz


  1. 260121-Prince.zip182.6 kB
    ZIP file with images

Edited by CsKwg