Custom fields added to invoice are not showing in the custom invoice template

I have added a few custom fields like Port of loading, Port of Destination in the sales invoice. These fields are appearing in the standard invoice template, however is not appearing in the custom template I created. I tried to use {{custom_fields}} but it does not appear nicely one below other as they appear if I use the standard invoice template.

The line I added in my custom invoice template is

<div style="font-weight: bold; padding-bottom: 20px; font-size: 12px" >{{ custom_fields}}</div>

See: Custom Field Placement through HTML