I am writing multiple page pdfs from a TCanvas. It works fine on my local machine, but when I run it from a remote machine in batch mode (because it doesn’t have a display), all but the first page of the resulting pdf turn out blank.
The relevant part of the code looks something like this:
c = new TCanvas("c","",200, 50, 550, 550);
c->Divide(2,2);
c -> Print("fname.pdf[");
for ( i = 0; i < 16; i++ ) {
for ( j = 0; j < 4; j++) {
c -> cd( j+1 );
hs[4*i + j]->Draw("lego2");
}
c -> Print("fname.pdf");
}
c -> Print("fname.pdf]");
I’ve observed this both when the hs are TH1Ds and when the hs are TH2Is. As I said, it works on my local machine, so I think the problem is batch mode. Does anyone know why this is or how to fix it?