You will need PDF Invoice PRO extension version 2.1.4 or higher for this feature. And also you should have the Huntbee’s Order shipment extension installed on your website
You can display order shipment tracking details on the PDF invoice or PDF Packaging Slip
In the template editor, you will add shortcodes as shown in the screenshot below

For the Bar Code tracking number, you will set up something this in the main extension settings

The generated PDF file will look like this
