PDF generated with cfdocument is not printable

Hello everyone,

I have a script that genere a PDF file. The file seems to be ok but when I try to print it with Adobe Acrobat there is an error and the PDF can’t be printed.

However I am able to do it with Chrome but some text is not printed.

The problem seems to be with the table. When the table is on two pages or more and there is a <th> repeated, the error appears.

Here is a sample code that reproduce the problem and you can find attached two PDF generated with the code above.

<cfprocessingdirective pageencoding="utf-8" />

<cfoutput>

	<cfscript>
		content = getContent();
	</cfscript>

	<cfdocument format="PDF" orientation="portrait" pagetype="A4" name="docContent">
		<cfscript>
			WriteOutput(content);
		</cfscript>
	</cfdocument>

	<cfscript>
		filename = getTempDirectory() & "/testPDF.pdf";
		FileWrite(filename, docContent);
	</cfscript>

</cfoutput>

<cffunction name="getContent" access="public" returntype="string" output="false">

	<cfsavecontent variable="result">
		<cfoutput>
			<table>
				<thead>
					<tr>
						<th>Article number</th>
						<th>Internal number</th>
						<th>Description</th>
						<th>Quantity</th>
						<th>Unite price</th>
						<th>Total price</th>
					</tr>
				</thead>
				<tbody>
					<cfloop index="i" from="1" to="70">
						<tr>
							<td>#i#</td>
							<td>123456</td>
							<td>I am the description of the article</td>
							<td>3</td>
							<td>6.00</td>
							<td>18.00</td>
						</tr>
					</cfloop>
				</tbody>
			</table>					
		</cfoutput>
	</cfsavecontent>

	<cfreturn result>

</cffunction>

If I change <th> by <td>, the header is not repeated on each page but I can print the PDF normaly.

<thead>
        <tr>
		<td>Article number</td>
		<td>Internal number</td>
		<td>Description</td>
		<td>Quantity</td>
		<td>Unite price</td>
		<td>Total price</td>
	</tr>
</thead>

Lucee version is 5.2.9.31.

Am I doing something wrong or is that a bug ?

th_not_printable.pdf (5.2 KB)
td_printable.pdf (4.9 KB)

You might want to try 5.3 with the new flying saucer PDF engine?

I’ve checked it with lucee 5.2.9.31 it has the column header for every page that was written in pdf with the help of <th>. But in lucee 5.3.1.102 & 5.3.3.43, it doesn’t have a column header for all the pages it is only available in the first page of the generated pdf.