fkrauthan / wp-mpdf

Print WordPress posts as PDF. Optional with Geshi highlighting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make the left content bigger in footer?

nijatmursali opened this issue · comments

I'm generating PDF with this library, it works quite good, but I have a problem with footer. It generates content, but left one is not as I want.

image

In the attached image, I actually put the address for the German one like this:

'L' =>
		array(
			'content' => '<table class="footer" style="width: 600px !important; margin-left: 4px;">
			<tr>
				<td style="width: 100%;">
					<div class="left">
						<p>Metratec GmbH</p>
						<p>Niels-Bohr-Str. 5 | 39106 Magdeburg, Germany</p>
						<p>T: +49 (0)391 251906-00 | F: +49 (0)391 251906-01</p>
						<p>Mail: sales@metratec.com | www.metratec.com</p>
						<br>
						<p>' . $currentDate . ' | ' . $currentHour . '</p>
					</div>
				</td>
			</tr>
			</table>',
			'font-size' => 8,
			'font-style' => 'BI',
			'font-family' => 'EuclidCircularB Regular',
		),

but it moves the city/country name part into the next line. Is it possible to make this part of the footer longer, so it will have no break in my p tags?

My full footer code is like following:

$pdf_footer = array(
	'odd' =>
	array(
		'R' =>
		array(
			'content' => '<img src="https://dev-itoito.io/img/metratec/logo.jpg" alt="logo" style="width: 200px;float:right;" />',
			'font-size' => 8,
			'font-style' => 'BI',
			'font-family' => 'EuclidCircularB Regular',
		),
		'L' =>
		array(
			'content' => '<table class="footer" style="width: 600px !important; margin-left: 4px;">
			<tr>
				<td style="width: 100%;">
					<div class="left">
						<p>Metratec GmbH</p>
						<p>Niels-Bohr-Str. 5 | 39106 Magdeburg, Germany</p>
						<p>T: +49 (0)391 251906-00 | F: +49 (0)391 251906-01</p>
						<p>Mail: sales@metratec.com | www.metratec.com</p>
						<br>
						<p>' . $currentDate . ' | ' . $currentHour . '</p>
					</div>
				</td>
			</tr>
			</table>',
			'font-size' => 8,
			'font-style' => 'BI',
			'font-family' => 'EuclidCircularB Regular',
		),
		'C' =>
		array(
			'content' => '<table class="footer">
			<tr>
				<td style="width: 100%;">
					<div class="left">
						<p>US Office </p>
						<p>Metratec USA</p>
						<p>6 Liberty Square #2073 02109 Boston, MA, United States</p>
						<p>T: +1 (857) 799-3795 | Mail: us@metratec.com </p>
						<br>
						<p>' . $currentDate . ' | ' . $currentHour . '</p>
					</div>
				</td>
			</tr>
			</table>',
			'font-size' => 8,
			'font-style' => 'BI',
			'font-family' => 'EuclidCircularB Regular',
		),
		'line' => 1,
		'line' => 1,

	),
);

You would have to check the mpdf documentation about that: https://mpdf.github.io/