Customize print templates

Hi, i am stack with customize some templates,
this is the point, i have changed, the invoice template, but when i make a delivery note steal having the same, how to make it dynamic?