Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Basic Three Column Table for Gravity PDF Header
<table autosize="1">
<tr>
<td align="left" width="33%">
<img src="http://example.com/wp-content/uploads/2015/08/logo.png" alt="Logo" />
</td>
<td align="center" width="33%">
{form_title}
</td>
<td align="right">
{date_dmy}
</td>
</tr>
</table>
@jakejackson1

This comment has been minimized.

Copy link
Owner Author

@jakejackson1 jakejackson1 commented Dec 30, 2015

Select the "Text" tab in the HTML editor and copy and paste the above. You can then switch back to the "Visual" tab.

@josephrorr

This comment has been minimized.

Copy link

@josephrorr josephrorr commented Jul 13, 2020

Nice! Thanks for this. Any way to make the logo a bit bigger? No matter what I do, I'm still getting a micro-sized logo in the header. I've even set the left and right columns to 10% and middle to 80%, and added img width/height tags, but it's still small. Any ideas?

@jakejackson1

This comment has been minimized.

Copy link
Owner Author

@jakejackson1 jakejackson1 commented Jul 13, 2020

@josephrorr Gravity PDF automatically restricts the height of images in headers/footers to prevent them taking up a large portion of a page. You can override this behaviour by including the style attribute in your IMG's HTML markup. To do this, select the "Text" tab in the Rich Text Editor, then add style="max-height: 400px" to the code. This might look like this in your editor:

<img src="http://pdf-test-site.local/wp-content/uploads/2018/03/Hydrangeas.jpg" alt="" width="1024" height="768" style="max-height: 400px" />

Adjust 400px to the size you need.

@josephrorr

This comment has been minimized.

Copy link

@josephrorr josephrorr commented Jul 16, 2020

@jakejackson1

This comment has been minimized.

Copy link
Owner Author

@jakejackson1 jakejackson1 commented Jul 16, 2020

Feel free to open a support ticket with details about how the PDF looks now and how you'd like it to look, as well as what variations on the max height you've tried and one of our team will be happy to assist. https://gravitypdf.com/support/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment