CAPS Universe documentation  1.0.4
All you need to know to be successful
Functions
doc-print-simplex.c File Reference

Routines to manage simplex printing. More...

Functions

static bool check_for_last_page (struct document_desc *job)
 
static void simplex_simple (struct document_desc *job)
 
static void simplex_with_copies (struct document_desc *job)
 
void simplex_next_page (struct document_desc *job)
 
void simplex_collating_next_page (struct document_desc *job)
 

Detailed Description

Author
Jürgen Borleis
Version
1.0.0
Warning
Use as experimental

Simplex printing happens with one copy and non-collating

Simplex printing happens with n copies, non-collating and no printer hardware copy support

Simplex printing happens with n copies, non-collating and with printer hardware copy support

Simplex printing happens with 1…n copies and collating

Function Documentation

◆ check_for_last_page()

static bool check_for_last_page ( struct document_desc job)
static

Check if the current page is the last one

Parameters
[in,out]jobInfos about the print job
Return values
0rstr_print_state::current_page isn't the last page
1rstr_print_state::current_page is the last page

◆ simplex_simple()

static void simplex_simple ( struct document_desc job)
static

Simply walk through a document and print one copy of each page

Parameters
[in,out]jobInfos about the print job

This routine covers the "Simplex printing happens with one copy and non-collating" use case.

Moves to the next page on each call.

Todo:
Can be replaced by simplex_collating_next_page() with rstr_print_state::copies_to_be_done == '1' when tests for this feature are available.

◆ simplex_with_copies()

static void simplex_with_copies ( struct document_desc job)
static

Simply walk through a document and print copies of each page (e.g. non-collating use case)

Parameters
[in,out]jobInfos about the print job

This routine covers the "Simplex printing happens with n copies, non-collating" use case. It handles the printer hardware support as well.

It moves to the next page, if all copies of the current page are printed

Precondition
The document's last page must be known
Copies > 1
Collate == 0
Todo:
Keep the raster for each copy

◆ simplex_next_page()

void simplex_next_page ( struct document_desc job)

Move forward in the document for simplex printing

Parameters
[in,out]jobInfos about the print job

Non-collating use case.

◆ simplex_collating_next_page()

void simplex_collating_next_page ( struct document_desc job)

Move forward in the document for simplex printing and repeat the whole document on demand

Parameters
[in,out]jobInfos about the print job

This routine covers the "Simplex printing happens with 1…n copies and collating" use case.

Collating usecase. If copies are required, it was already set in handle_initial_page()

If rstr_print_state::copies_to_be_done is '1' it behaves the same like simplex_simple()

Attention
Progression reporting in handle_next_page() relies on this function's behaviour!