[Bug] Footer and page size incorrect for custom printed layout
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 9m
- Merged PRs (30d)
- 11
Description
**Describe the bug**
Using the new #9850 feature to specify a custom layout, the footer containing page numbers is not positioned correctly. The page content is also not scaled correctly to fit onto the page
**To Reproduce**
Steps to reproduce the behavior:
1. Add custom CSS as in #9850 to force custom print layout
```css
@media print {
@page {
size: A4 landscape;
}
}
```
3. Build and run docfx to create output that includes pdf settings like the following sample `globalMetadata`
```json
"globalMetadata": {
"_appTitle": "On Key Release Notes",
"_appFooter": "On Key Plus 2024.13.0 (Build 0)",
"_appFaviconPath": "images/favicon.png",
"_appLogoPath": "images/onkey_icon.png",
"_enableNewTab": true,
"_enableSearch": true,
"_disableNavBar": "true",
"_disableBreadcrumb": "true",
"_disableToc": "false",
"_disableAffix": "false",
"pdf": true,
"pdfTocPage": true,
"pdfFileName": "onkey_releasenotes.pdf",
"pdfPrintBackground": true
},
```
**Generated output**

Notice that the page content is not scaled to fix onto the page (nr 2) and that the footer is not positioned correctly (nr 1) as illustrated above
**Context (please complete the following information):**
- OS: Windows
- Docfx version: 2.77.0
Contributor guide
Assessment
This issue has not been assessed yet.