-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Check duplicate issues.
- Checked for duplicates
Description
The TPad::Print() has the possibility to specify the page title string for the table of content, which ease the navigation of generated multi-page PDF files. It works great, except of the very last page.
All in all, the issue is the "Title:name" is not respected for the very last page of pdf generated with TPad::Print() .
Reproducer
Please see below the script which reproduce the problem:
$ cat title.cxx
# run as root -b -q -l title.cxx
#include "TCanvas.h"
#include "TH1.h"
void title()
{
TH1I bgoplot("bgoplot", "BGO;Energy, MeV;#nevents", 150, -3, 3);
bgoplot.FillRandom("gaus", 1000);
TH1I ecalplot("ecalplot", "ECAL;Energy, GeV;#nevents", 150, -3, 3);
ecalplot.FillRandom("gaus", 1000);
TCanvas c("plots", "plots");
c.Print("plots.pdf[");
c.Clear();
bgoplot.Draw();
c.Print("plots.pdf", "Title:BGO");
c.Clear();
ecalplot.Draw();
c.Print("plots.pdf", "Title:ECAL");
c.Print("plots.pdf]");
}
Here is the screenshot - the table of contents label for page2 should be "ECAL":
ROOT version
$ ssh lxplus
$ root --version
ROOT Version: 6.38.00
Built for linuxx8664gcc on Dec 18 2025, 00:00:00
From tags/6-38-00@6-38-00
Installation method
cern lxplus
Operating system
rhel9.7
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status