3.3.2.49 Print

Syntax:

print  [option]

Options:

no option; Print the page in the active window

Syntax: print no option

Print the page in the active window. To print a named window, use the window command: win -o windowName print;

-a; Open the Print dialog box

Syntax: print -a

Open the Print dialog box before printing the page.

-pdf; generate PDF file

Syntax: print -pdf fname$

Generate PDF file

-s; Open the Page Setup dialog box

Syntax: print -s

Open the Page Setup dialog box.

Examples:

Example 1

The following script opens the Print dialog box for the active window.

print -a;

Example 2

The next script prompts a user for multiple projects and prints all the graphs in all the selected projects.

getfile -m *.org;  // opens multifile dialog 
loop (i, 1, count) 
      {   // number of files is in count 
            getfile -get I;  // get ith file into %A 
            doc -open %A;  // opens project 
            doc -e P
            {
                  print;
                  // pause 2 min to avoid overloading print queue 
                  sec -pause 120;
            };
      };