Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ppd_emit_to_file(3) [debian man page]

ppd_emit_to_file(3)					     Library Functions Manual					       ppd_emit_to_file(3)

NAME
ppd_emit_to_file, ppd_emit_to_fd - Output device specific code. SYNOPSIS
#include <ppd/ppd.h> gboolean ppd_emit( PpdFile * ppd,FILE *fp,PpdSectionOrder section ); gboolean ppd_emitfd( PpdFile * ppd, int fd,PpdSectionOrder section ); DESCRIPTION
The ppd_emit_* functions output the device specific code appropriate to the specified section that has not already been emitted.. The PpdFile pointer is obtained from opening a PPD file via the ppd_load(3) family of functions. The section can be any one of the following: PPD_ORDER_ANY Option code can be anywhere in the file PPD_ORDER_DOCUMENT Option code must be in the DocumentSetup section PPD_ORDER_EXIT Option code must be sent prior to the document PPD_ORDER_JCL Option code must be sent as a JCL command PPD_ORDER_PAGE Option code must be in the PageSetup section PPD_ORDER_PROLOG Option code must be in the Prolog section The sections PPD_ORDER_DOCUMENT and PPD_ORDER_PAGE will also output code from the PPD_ORDER_ANY section. Once a code section has been emitted it is marked as such and will not be emitted unless it is re-marked. EXAMPLE
/* Setup code to emitted */ ppd_mark_defaults(ppd); ppd_mark_option(ppd,"Duplex","DuplexNoTumble"); ppd_mark_option(ppd,"PageSize","A4"); /* Emit initial code (including any reset and JCL code) */ ppd_emit_to_file(ppd,stdout,PPD_ORDER_EXIT); fputs(ppd->jcl_begin->str,stdout); ppd_emit_to_file(ppd, stdout, PPD_ORDER_JCL); fputs(ppd->jcl_ps->str, stdout); /* Any header comments go here */ ... /* Prolog section */ printf("%%%%BeginProlog0); ppd_emit_to_file(ppd, stdout, PPD_ORDER_PROLOG); printf("%%%%EndProlog0); /* Setup section */ printf("%%%%BeginSetup0); ppd_emit_to_file(ppd, stdout, PPD_ORDER_DOCUMENT); printf("%%%%EndSetup0); /* Main document begins */ for (...) { printf("%%%%Page: 1 10); /* Re-mark so that this is emitted on each page */ ppd_mark_option(ppd,"PageSize","A4"); printf("%%%%PageSetup0); ppd_emit_to_file(ppd, stdout, PPD_ORDER_PAGE); printf("%%%%EndPageSetup0); /* Page info goes here */ ... } /* Send ending JCL code */ fputs(ppd->jcl_end->str,stdout); SEE ALSO
ppd_file_new(3), ppd_file_free(3) ppd_emit_to_file(3)

Check Out this Related Man Page

CUPS-GENPPDUPDATE(8)					      Gutenprint Manual Pages					      CUPS-GENPPDUPDATE(8)

NAME
cups-genppdupdate - update Gutenprint PPD files SYNOPSIS
cups-genppdupdate [-h] [-n] [-N] [-q | -v] [-s ppd-directory] [-s output-directory] [PPD-FILES or QUEUES...] DESCRIPTION
cups-genppdupdate regenerates the Gutenprint PPD files in use by CUPS, using the PPD files under /usr/share/cups/model/gutenprint as tem- plates. The new PPD file replaces the old PPD file under /private/etc/cups/ppd, but all the options set in the old PPD will be merged into the new PPD, provided that they are still valid in the new file. If no files or queue names are specified, cups-genppdupdate updates all Gutenprint PPD files in /private/etc/cups/ppd. Otherwise, cups-genppdupdate updates all files or queues listed on the command line. cups-genppdupdate does not update Foomatic PPD files or PPD files from Gimp-Print 4.2 or earlier. cups-genppdupdate does not restart cupsd. cupsd will need manually reloading (or send SIGHUP) once cups-genppdupdate has completed. OPTIONS
-h Show a help message. -n No action. The program will run, but the old PPD files will not be replaced. -q Quiet mode. No messages will be issued, apart from errors. -v Verbose mode. More informative messages will be issued. Note that extremely verbose output may be turned on by setting $debug=1 in the source, but this output will not be of use to the average user. -s ppd-directory Use ppd-directory as the base directory to read PPD files from. By default, the base directory is /usr/share/cups/model/gutenprint. Under this directory, the PPD files are located in subdirectories according to language code and territory. -o output-directory Place updated PPD files in output-directory. By default, this is the same as the input directory. -N Reset all options to their defaults (do not merge options from the current PPD file) SEE ALSO
cups-genppd(8), cups-genppdconfig(8), CUPS Software Administrators Manual, http://localhost:631/documentation.html COPYRIGHT
Copyright (C) 2002-2006 Roger Leigh (rleigh@debian.org) and Robert Krawitz (rlk@alum.mit.edu) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This manual page was written by Roger Leigh (rleigh@debian.org). Version 5.2.3 21 Dec 2008 CUPS-GENPPDUPDATE(8)
Man Page