Refs #20431 - Fix long PDF headers and footers

- Truncate long headers and footers
- Align header and footer text left/right based on page number