One possible reason why the invoice number isn't showing on your pdf file is that, the option to show Form numbers is not checked. Let me help enable this from your Custom Form Style settings for the invoice number to appear on the pdf invoice.
Here's how:
Click the Gear icon.
Go to Custom Form Styles.
Choose the invoice template, then click Edit.
Click the Content tab.
Click the Pencil icon in the first row of the template.
Put a check mark in the Form numbers box, then click Done.
And you're all set. You should now see the invoice number on your pdf invoice.