//if you have really a lot of lines in the footer, then replace 9 with 10 or 11
var footerHeight = totalLines * 9;
This should be a parameter in the configuration area.
In Presentation/Nop.Web/Controllers/OrderController.cs line 195:
return File(bytes, MimeTypes.ApplicationPdf, $"order_{order.Id}.pdf");
"order_" should not be a raw string for localization purpose. This should be customizable by language.