Canon
to Site index
to Home to CISRA Overview to Canon Gateway

Back to OpenPage Introduction
         

Document Structure

To allow device and document control, yet not compromise device independence, OpenPage scripts have a simple but mandatory structure which isolates device control from page descriptions. This same structure also forces page independence (allowing page rearrangement and restructuring) unless the document as a whole declares itself to be unstructured.
As an example:

#[device CLC550

      set_dev_param("toner_mask", 0x7);

#]device


This optional section is ignored by any device other than a CLC550. It can be stripped off or replaced by independent applications as necessary.

#[device_class printer

      set_num_copies(3);

#]device_class


This optional section is ignored by any non-printer device. It can be similarly stripped off or replaced.

#[document 0 0 210 297

      static width = 140;


Document preamble code which is required by all pages in the document.
Pages which are position and size independent and can be re-ordered by other applications.
Within the document section, pages may be re-arranged as long as they have their original document preamble when they are printed or displayed. The openpage structure is illustrated in 2 examples below:

#[page 1
    rect(35, 78.5, width, width);
    page := path();
#]page


#[page 2
    arc_acw(105, 148.5, width/2, 0, 2*pi);
    page := path();
#]page

Back to Top