Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7858 views
1
#ifndef MUPDF_FITZ_OUTPUT_PCL_H
2
#define MUPDF_FITZ_OUTPUT_PCL_H
3
4
#include "mupdf/fitz/system.h"
5
#include "mupdf/fitz/context.h"
6
#include "mupdf/fitz/output.h"
7
#include "mupdf/fitz/pixmap.h"
8
#include "mupdf/fitz/bitmap.h"
9
10
/*
11
PCL output
12
*/
13
typedef struct fz_pcl_options_s fz_pcl_options;
14
15
struct fz_pcl_options_s
16
{
17
/* Features of a particular printer */
18
int features;
19
const char *odd_page_init;
20
const char *even_page_init;
21
22
/* Options for this job */
23
int tumble;
24
int duplex_set;
25
int duplex;
26
int paper_size;
27
int manual_feed_set;
28
int manual_feed;
29
int media_position_set;
30
int media_position;
31
32
/* Updated as we move through the job */
33
int page_count;
34
};
35
36
/*
37
fz_pcl_preset: Retrieve a set of fz_pcl_options suitable for a given
38
preset.
39
40
opts: pointer to options structure to populate.
41
42
preset: Preset to fetch. Currently defined presets include:
43
ljet4 HP DeskJet
44
dj500 HP DeskJet 500
45
fs600 Kyocera FS-600
46
lj HP LaserJet, HP LaserJet Plus
47
lj2 HP LaserJet IIp, HP LaserJet IId
48
lj3 HP LaserJet III
49
lj3d HP LaserJet IIId
50
lj4 HP LaserJet 4
51
lj4pl HP LaserJet 4 PL
52
lj4d HP LaserJet 4d
53
lp2563b HP 2563B line printer
54
oce9050 Oce 9050 Line printer
55
56
Throws exception on unknown preset.
57
*/
58
void fz_pcl_preset(fz_context *ctx, fz_pcl_options *opts, const char *preset);
59
60
/*
61
fz_pcl_option: Set a given PCL option to a given value in the supplied
62
options structure.
63
64
opts: The option structure to modify,
65
66
option: The option to change.
67
68
val: The value that the option should be set to. Acceptable ranges of
69
values depend on the option in question.
70
71
Throws an exception on attempt to set an unknown option, or an illegal
72
value.
73
74
Currently defined options/values are as follows:
75
76
spacing,0 No vertical spacing capability
77
spacing,1 PCL 3 spacing (<ESC>*p+<n>Y)
78
spacing,2 PCL 4 spacing (<ESC>*b<n>Y)
79
spacing,3 PCL 5 spacing (<ESC>*b<n>Y and clear seed row)
80
mode2,0 or 1 Disable/Enable mode 2 graphics compression
81
mode3,0 or 1 Disable/Enable mode 3 graphics compression
82
mode3,0 or 1 Disable/Enable mode 3 graphics compression
83
eog_reset,0 or 1 End of graphics (<ESC>*rB) resets all parameters
84
has_duplex,0 or 1 Duplex supported (<ESC>&l<duplex>S)
85
has_papersize,0 or 1 Papersize setting supported (<ESC>&l<sizecode>A)
86
has_copies,0 or 1 Number of copies supported (<ESC>&l<copies>X)
87
is_ljet4pjl,0 or 1 Disable/Enable HP 4PJL model-specific output
88
is_oce9050,0 or 1 Disable/Enable Oce 9050 model-specific output
89
*/
90
void fz_pcl_option(fz_context *ctx, fz_pcl_options *opts, const char *option, int val);
91
92
void fz_output_pcl(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, fz_pcl_options *pcl);
93
94
void fz_output_pcl_bitmap(fz_context *ctx, fz_output *out, const fz_bitmap *bitmap, fz_pcl_options *pcl);
95
96
void fz_write_pcl(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, fz_pcl_options *pcl);
97
98
void fz_write_pcl_bitmap(fz_context *ctx, fz_bitmap *bitmap, char *filename, int append, fz_pcl_options *pcl);
99
100
#endif
101
102