Printing win32

Hello,

I am using version 4.00/08 for win32.

I have a very silly question on how to print directly to a network printer. Up to now, I have to print in a file and then print this file. There must be a way to print directly…

Regards,

Marc

Hi Marc,

Here is a tip to print “a la windows” :wink: with print dialog,
without blocking ROOT application :

Version with Adobe acrobat reader :

case kCM_BUTTON:
case kCM_MENU:
switch (parm1) {
case M_PRINT:
sprintf(str,"%s\spool\temp.pdf", gProgPath); // or any temp path
gPad->Print(str);
sprintf(str,“start AcroRd32 /p %s\spool\temp.pdf”, gProgPath);
gSystem->Exec(str);
break;

Version with GhostScript/GhostView :

  case M_PRINT: 
     sprintf(str,"%s\\spool\\temp.ps", gProgPath); // or any temp path 
     gPad->Print(str); 
     sprintf(str,"start gsprint -colour -query %spool\\temp.ps",
               gProgPath); 
     gSystem->Exec(str); 
     break;

HTH.
Cheers,
Bertrand.

Hi Bertrand,

Thanks for your answer, but this is really cutting the edges for me. Could you give me some additional explanations please… Especially on the definitions of the variables, i.e. which ones are known to Root.

Marc

You can use the Windows version with Qt layer. It provides the direct acces to Windows printers.

root.bnl.gov/QtRoot/QtRoot.html#features
root.bnl.gov/QtRoot/TQtCanvasPrintMenu.gif

To install just click

root.bnl.gov/QtRoot/downloads/root.4.00.08.exe

Thanks, this does the job.

Marc