CAPS Universe documentation  1.0.4
All you need to know to be successful
Data Fields
caps_rstr_page_desc Struct Reference

Data Fields

unsigned no
 
unsigned copies
 
unsigned duplex_front:1
 
unsigned duplex_reverse:1
 
unsigned last_page:1
 
unsigned eject_medium:1
 
const char * medium_name
 
struct caps_rect medium_sz
 
struct caps_area printing_area
 
struct caps_rect printing_sz
 

Detailed Description

The printing state machine

A description of the to be printed (e.g. current) page (extracted from the printing document). This information instructs the printing driver about parameters of the current page. Its filled by the CAPS infrastructure and used by the printing driver.

A simplex printing job queries this information once per medium, a duplex printing job twice per medium.

If the printer signals hardware copy support (CAPS_RSTR_HW_COPY, e.g. send the medium data once, printing multiple times) caps_rstr_page_desc::copies signals the copies to print. On a simplex print job this member is valid in each call, on a duplex print job it is 0 for the front side (e.g. invalid) and valid for the reverse side.

E.g. whenever this member isn't 0 while duplex printing, the medium is to be printed (think about only one side of the medium should be printed).

Duplex example:

Page number front reverse eject last page copies
7 true false false false 0
8 false true true false 1
9 true false true false 1
12 false true true true 1

Simplex example:

Page number front reverse eject last page copies
7 true false true false 1
8 true false true false 1
9 true false true false 1
12 true false true true 1

Field Documentation

◆ no

unsigned no

The document's page number to print

◆ copies

unsigned copies

Count of copies to be printed (at least '1'), but can be '0' if the current medium isn't done, yet (duplex print)

◆ duplex_front

unsigned duplex_front

Valid for duplex print only, '1' = this page should be the front page of a duplex printed medium

◆ duplex_reverse

unsigned duplex_reverse

Valid for duplex print only, '1' = this page should be the reverse page of a duplex printed medium

◆ last_page

unsigned last_page

It's '1' if this is the last page to print, e.g. printing job is done after this page

◆ eject_medium

unsigned eject_medium

Eject medium after this page

◆ medium_name

const char* medium_name

Generic name of the document's page like a4 or letter. Or custom if unknown
Corresponds to medium_sz and can be used to discover the to be used medium in a simpler manner (if the printer can select from various media formats at a time)

Note
The format name is guessed from the medium_sz and might be unreliable

◆ medium_sz

struct caps_rect medium_sz

Medium size to print to, intended by the document, unit is [pts]
Corresponds to medium_name and can be used to discover the to be used medium (if the printer can select from various media formats at a time)

◆ printing_area

struct caps_area printing_area

Document's target printing area, unit is [pts], this is relevant

◆ printing_sz

struct caps_rect printing_sz

Document's target printing size (convenience only, same info as in printing_area)


The documentation for this struct was generated from the following file: