diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-10-06 19:27:00 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-10-13 15:57:24 +0100 |
commit | 5f044ffe43f770fade1934a6415cac08f82dd83c (patch) | |
tree | e53adf75b6d185fe320eb1ab6b555e95ead6866d /include/mupdf/fitz/output-pclm.h | |
parent | 365b009b648700e90ed0c83791849ba86b3f3678 (diff) | |
download | mupdf-5f044ffe43f770fade1934a6415cac08f82dd83c.tar.xz |
Simple PCLm device.
Both bandwriter and document_writer interfaces cope with multi
page docs.
Update mudraw to output pclm format too.
Incorporates fixes from Tor.
Diffstat (limited to 'include/mupdf/fitz/output-pclm.h')
-rw-r--r-- | include/mupdf/fitz/output-pclm.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/mupdf/fitz/output-pclm.h b/include/mupdf/fitz/output-pclm.h new file mode 100644 index 00000000..74c811f5 --- /dev/null +++ b/include/mupdf/fitz/output-pclm.h @@ -0,0 +1,41 @@ +#ifndef MUPDF_FITZ_OUTPUT_PCLM_H +#define MUPDF_FITZ_OUTPUT_PCLM_H + +#include "mupdf/fitz/system.h" +#include "mupdf/fitz/context.h" +#include "mupdf/fitz/output.h" +#include "mupdf/fitz/band-writer.h" +#include "mupdf/fitz/pixmap.h" +#include "mupdf/fitz/bitmap.h" + +/* + PCLm output +*/ +typedef struct fz_pclm_options_s fz_pclm_options; + +struct fz_pclm_options_s +{ + int compress; + int strip_height; + + /* Updated as we move through the job */ + int page_count; +}; + +/* + fz_parse_pclm_options: Parse PCLm options. + + Currently defined options and values are as follows: + + compression=none: No compression + compression=flate: Flate compression + strip-height=n: Strip height (default 16) +*/ +fz_pclm_options *fz_parse_pclm_options(fz_context *ctx, fz_pclm_options *opts, const char *args); + +fz_band_writer *fz_new_pclm_band_writer(fz_context *ctx, fz_output *out, const fz_pclm_options *options); +fz_document_writer *fz_new_pclm_writer(fz_context *ctx, const char *path, const char *options); +void fz_write_pixmap_as_pclm(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, const fz_pclm_options *options); +void fz_save_pixmap_as_pclm(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, const fz_pclm_options *options); + +#endif |