CAPS Universe documentation  1.0.4
All you need to know to be successful
Functions | Variables
hl-pcl.c File Reference

Create printer's wire data for HL monochrome laser printers in PCL mode. More...

Functions

static void hl_pcl_mode_job_start (struct hl_drv *t, struct hl_job_options *j)
 
static int hl_pcl_mode_1030_page_encode (struct hl_drv *t)
 
static int hl_pcl_mode_1027_1200dpi_page_encode (struct hl_drv *t)
 
static int hl_pcl_mode_1027_page_encode (struct hl_drv *t)
 
static void hl_pcl_mode_page_finish (struct hl_drv *t)
 
static void hl_pcl_mode_job_finish (struct hl_drv *t)
 

Variables

const struct hl_encoder_calls pcl_1027_calls
 
const struct hl_encoder_calls pcl_1030_calls
 

Function Documentation

◆ hl_pcl_mode_job_start()

static void hl_pcl_mode_job_start ( struct hl_drv *  t,
struct hl_job_options *  j 
)
static
Precondition
The printer is in PCL mode

◆ hl_pcl_mode_1030_page_encode()

static int hl_pcl_mode_1030_page_encode ( struct hl_drv *  t)
static

Encode the full page according to the 1030 method

Parameters
[in,out]tDriver info
Return values
0on success
-errnoon failures

The 1030 mode is the preferred one, due to its better compression. Okay, a litte bit better than the 1027 mode...

Precondition
Printer must be in PCL mode

◆ hl_pcl_mode_1027_1200dpi_page_encode()

static int hl_pcl_mode_1027_1200dpi_page_encode ( struct hl_drv *  t)
static

Encode the full page according to the 1027 method in 1200 DPI (aka 'HQ1200')

Parameters
[in,out]tJob info
Return values
0on success
-errnoon failures

For the HQ1200 print mode it makes no sense to rasterize the graphics at 1200 x 1200 DPI. 1200 x 600 DPI is enough.

Because the HQ1200 mode is special, as it has 1200 DPI only in the horizontal direction. The vertical direction has still only 600 DPI. But: We must send every line twice.

This routine is a special variant of hl_pcl_mode_1027_page_encode() which sends every line twice: one encoded in a regular manner and the second as a copy of the first one.

◆ hl_pcl_mode_1027_page_encode()

static int hl_pcl_mode_1027_page_encode ( struct hl_drv *  t)
static

Encode the full page according to the 1027 method

Parameters
[in,out]tJob info
Return values
0on success
-errnoon failures

◆ hl_pcl_mode_page_finish()

static void hl_pcl_mode_page_finish ( struct hl_drv *  t)
static
Precondition
Printer must be in PCL mode

◆ hl_pcl_mode_job_finish()

static void hl_pcl_mode_job_finish ( struct hl_drv *  t)
static
Precondition
Printer must be in PCL mode
Postcondition
The printer is in PJL mode

Variable Documentation

◆ pcl_1027_calls

const struct hl_encoder_calls pcl_1027_calls
Initial value:
= {
.encoder = HL_PRN_LANG_PCL,
.job_start = hl_pcl_mode_job_start,
.job_finish = hl_pcl_mode_job_finish,
.page_finish = hl_pcl_mode_page_finish,
}
static void hl_pcl_mode_page_finish(struct hl_drv *t)
Definition: hl-pcl.c:397
static void hl_pcl_mode_job_start(struct hl_drv *t, struct hl_job_options *j)
Definition: hl-pcl.c:32
static void hl_pcl_mode_job_finish(struct hl_drv *t)
Definition: hl-pcl.c:410
static int hl_pcl_mode_1027_page_encode(struct hl_drv *t)
Definition: hl-pcl.c:282

◆ pcl_1030_calls

const struct hl_encoder_calls pcl_1030_calls
Initial value:
= {
.encoder = HL_PRN_LANG_PCL,
.job_start = hl_pcl_mode_job_start,
.job_finish = hl_pcl_mode_job_finish,
.page_finish = hl_pcl_mode_page_finish,
}
static int hl_pcl_mode_1030_page_encode(struct hl_drv *t)
Definition: hl-pcl.c:47