14.12 Postscript

Postscript output is currently done as image output rather than high-level objects.

Pixmaps suitable for PS image output are greyscale, RGB or CMYK with no alpha.

void fz_write_pixmap_as_ps(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap); 
 
void fz_save_pixmap_as_ps(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append); 
 
fz_band_writer *fz_new_ps_band_writer(fz_context *ctx, fz_output *out);

Postscript requires file level headers and trailers, over and above that produced by the band writer itself. These can be generated using the following functions:

void fz_write_ps_file_header(fz_context *ctx, fz_output *out); 
 
void fz_write_ps_file_trailer(fz_context *ctx, fz_output *out, int pages);

These are not generated by the band writer itself to allow a single output stream to be generated containing many pages, but a single file header and trailer.