${SHEETNAME} evaluates as blank on root sheet when exporting PDF schematic
<!----------Before Creating a New Issue-----------
* Limit report to a single issue.
* Search the issue tracker to verify the issue has not already been reported.
* Complete all instructions between `template comment markers <>.
* Keep report contents limited to the necessary information required to fix the issue.
* When creating an issue against the stable version of KiCad, make sure the latest available stable version is installed as issues may have already been resolved in later stable versions.-->
# Description
<!--What is the current behavior and what is the expected behavior?-->
When exporting PDF of schematic using kicad-cli sch export pdf, text fields using ${SHEETNAME} are blank on root sheet only. Expected behaviour is that it would either render as "Root" (default) or name if manually renamed. ${SHEETNAME} appears correctly in Kicad schematic editor. Sheets other than the root sheet have the name appear correctly. Behaviour is seen on Desktop Linux (version quoted below) and Kicad provided Docker container kicad/kicad:10.0-full (tried with 10.0.2 and 10.0.3)
<!--If the issue is visual/graphical, please attach screenshots of the problem.-->
Drawing sheet:
{width="780" height="521"}
View in Kicad schematic editor:
{width="529" height="329"}
Exported PDF:
{width="529" height="329"}
<!--Add the issue details below this line and before the "Steps to reproduce" heading.-->
# Steps to reproduce
<!--If there are multiple steps to reproduce it or it is a visual issue, then providing a screen recording as an attachment to this report is recommended.-->
<!--If this issue is specific to a project, please attach the necessary files to this issue.-->
<!--Add the steps to reproduce using the numbers below-->
<!--Add new step numbers before the "KiCad Version" heading.-->
1. Create new Kicad project
2. Create drawing sheet using drawing sheet editor so a field contains ${SHEETNAME}
3. Apply drawing sheet template to kicad project (File -\> Page Settings -\> select in "File" option -\> Apply.
4. Verify root sheet shows "Root" in field set to ${SHEETNAME}
5. Export schematic using \`kicad-cli sch export pdf -o test.pdf \<name-of-project.kicad_sch\>\`
# KiCad Version
<!--Copy version information (from main menu Help->About KiCad ->Copy Version Info) and paste it between the triple backticks below to preserve the formatting.-->
```
```
```
Application: KiCad Schematic Editor x86_64 on x86_64
Version: 10.0.3-10.0.3~ubuntu24.04.1, release build
Libraries:
wxWidgets 3.2.4 GLX
FreeType 2.13.2
HarfBuzz 8.3.0
FontConfig 2.15.0
Platform: Ubuntu 24.04.4 LTS, 64 bit, Little endian, wxGTK, X11, wayland, ubuntu:GNOME, ubuntu
OpenGL: VMware, Inc., SVGA3D; build: RELEASE; LLVM;, 4.1 (Compatibility Profile) Mesa 25.2.8-0ubuntu0.24.04.1, GLX 1.4
wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.83.0
OCC: 7.6.3
Curl: 8.5.0
ngspice: 42
Compiler: GCC 13.3.0 with C++ ABI 1018
KICAD_IPC_API=ON
KICAD_USE_PCH=OFF
Locale:
Lang: en_US
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)
```
issue