Hi,
I think there is a small bug in the TCanvas::Print method when creating a multipage PDF with the [ and ] syntax. My code is essentially (PyROOT)
canvas = TCanvas("CKCanvas","CKCanvas",600,600)
I open the PDF with
canvas.Print("Rich1Gas-RefIndexCalib.pdf[")
fill it with calls like
canvas.Print("Rich1Gas-RefIndexCalib.pdf")
and finally close it with
canvas.Print("Rich1Gas-RefIndexCalib.pdf]")
This results in a PDF that is invalid. If instead of creating a PDF I make a PS file by just changing the name to Rich1Gas-RefIndexCalib.ps, it works fine.
I *think* the problem is the calls with the [ and ] to open and close the file are confused as to the file type, since I get
Info in <TCanvas::Print>: ps file Rich1Gas-RefIndexCalib.pdf has been created
when opening and
Info in <TCanvas::Print>: Current canvas added to ps file Rich1Gas-RefIndexCalib.pdf
when closing. i.e. it seems to think its a PS file, not a PDF. The calls in between seem OK
Info in <TCanvas::Print>: Current canvas added to pdf file Rich1Gas-RefIndexCalib.pdf
i.e. it correctly claims to be making a PDF this time.
I might be doing something wrong, but I fail to see what, given the syntax is so simple...
cheers Chris Received on Wed May 26 2010 - 12:31:17 CEST
This archive was generated by hypermail 2.2.0 : Thu May 27 2010 - 23:50:02 CEST