Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7858 views
1
#ifndef MUPDF_FITZ_OUTPUT_PWG_H
2
#define MUPDF_FITZ_OUTPUT_PWG_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
typedef struct fz_pwg_options_s fz_pwg_options;
11
12
struct fz_pwg_options_s
13
{
14
/* These are not interpreted as CStrings by the writing code, but
15
* are rather copied directly out. */
16
char media_class[64];
17
char media_color[64];
18
char media_type[64];
19
char output_type[64];
20
21
unsigned int advance_distance;
22
int advance_media;
23
int collate;
24
int cut_media;
25
int duplex;
26
int insert_sheet;
27
int jog;
28
int leading_edge;
29
int manual_feed;
30
unsigned int media_position;
31
unsigned int media_weight;
32
int mirror_print;
33
int negative_print;
34
unsigned int num_copies;
35
int orientation;
36
int output_face_up;
37
unsigned int PageSize[2];
38
int separations;
39
int tray_switch;
40
int tumble;
41
42
int media_type_num;
43
int compression;
44
unsigned int row_count;
45
unsigned int row_feed;
46
unsigned int row_step;
47
48
/* These are not interpreted as CStrings by the writing code, but
49
* are rather copied directly out. */
50
char rendering_intent[64];
51
char page_size_name[64];
52
};
53
54
/*
55
fz_write_pwg: Save a pixmap as a pwg
56
57
filename: The filename to save as (including extension).
58
59
append: If non-zero, then append a new page to existing file.
60
61
pwg: NULL, or a pointer to an options structure (initialised to zero
62
before being filled in, for future expansion).
63
*/
64
void fz_write_pwg(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, const fz_pwg_options *pwg);
65
66
/*
67
fz_write_pwg_bitmap: Save a bitmap as a pwg
68
69
filename: The filename to save as (including extension).
70
71
append: If non-zero, then append a new page to existing file.
72
73
pwg: NULL, or a pointer to an options structure (initialised to zero
74
before being filled in, for future expansion).
75
*/
76
void fz_write_pwg_bitmap(fz_context *ctx, fz_bitmap *bitmap, char *filename, int append, const fz_pwg_options *pwg);
77
78
/*
79
Output a pixmap to an output stream as a pwg raster.
80
*/
81
void fz_output_pwg(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, const fz_pwg_options *pwg);
82
83
/*
84
Output the file header to a pwg stream, ready for pages to follow it.
85
*/
86
void fz_output_pwg_file_header(fz_context *ctx, fz_output *out);
87
88
/*
89
Output a page to a pwg stream to follow a header, or other pages.
90
*/
91
void fz_output_pwg_page(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, const fz_pwg_options *pwg);
92
93
/*
94
Output a bitmap page to a pwg stream to follow a header, or other pages.
95
*/
96
void fz_output_pwg_bitmap_page(fz_context *ctx, fz_output *out, const fz_bitmap *bitmap, const fz_pwg_options *pwg);
97
98
#endif
99
100