PWG/CUPS

The PWG format is intended to encapsulate output for printers. As such there are many values that can be set in the headers. To allow for this, we expose these fields as an options structure that can be fed into the output functions.


\begin{lstlisting}
typedef struct fz_pwg_options_s fz_pwg_options;
\par
struct f...
...ut. */
char rendering_intent[64];
char page_size_name[64];
};
\end{lstlisting}

No documentation for these fields is given here - for more information see the PWG specification.

There are 2 sets of output functions available for PWG, those that take fz_pixmaps (for contone output) and those that take fz_bitmaps (for halftoned output).

PWG files are structured as a header (to identify the format), followed by a stream of pages (images). Those functions that save (or write) a complete file include the file header as part of their output. If the option is used to append to a file, then the header is not added, as we presume we are appending new page information to the end of an existing file.

In circumstances when the header is not output automatically (such as when using the band writer) the header output must be triggered manually, by calling:


\begin{lstlisting}
/*
Output the file header to a pwg stream, ready for pages t...
...void fz_write_pwg_file_header(fz_context *ctx, fz_output *out);
\end{lstlisting}



Subsections