1
/* cups-pdf.h -- CUPS Backend Header File (version 1.7.0a, 2005-03-07)
2
16.05.2003, Volker C. Behr
3
Exp. Physik V, Uni Wuerzburg
4
vrbehr@cip.physik.uni-wuerzburg.de
5
http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf
8
This code may be freely distributed as long as this header
9
is preserved. Changes to the code should be clearly indicated.
11
This code is distributed under the GPL.
12
(http://www.gnu.org/copyleft/gpl.html)
14
For more detailed licensing information see cups-pdf.c in the
15
corresponding version number. */
18
/* User-customizable settings - if unsure leave the default values
19
/ they are reasonable for most systems. */
21
/* location of GhostScript binary (gs) */
22
#define CPGHOSTSCRIPT "/usr/bin/gs"
24
/* location of temporary files during GhostScript operation
25
this must be user-writable like /var/tmp or /tmp ! */
26
#define CPGSTMP "/var/tmp"
28
/* command line for calling GhostScript */
29
#define CPGSCALL "%s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER \
30
-sDEVICE=pdfwrite -sOutputFile=\"%s\" -dAutoRotatePages=/PageByPage \
31
-dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode \
32
-dPDFSETTINGS=/prepress -c save pop -f %s"
34
/* PDF version to be created - can be "1.5", "1.4", "1.3" or "1.2" */
35
#define CPPDFVER "1.4"
37
/* CUPS-PDF spool directory - make sure there is no user 'SPOOL' on your
38
system or change the path */
39
#define CPSPOOL "/var/spool/cups-pdf/SPOOL"
41
/* CUPS-PDF output directory
42
special qualifier: "$HOME" will set output directory dynamically
43
to the user's home directory (also true for an anonymous
44
user - make sure the home directory exists and is accessible!)
45
in case CPOUT is an NFS export make sure it is exported without
49
/* CUPS-PDF subdirectory for output in a user's home directory
50
only required if CPOUT is set to "$HOME"
51
can be "" or a single relative directory name */
52
#define CPHOMESUB "cups-pdf"
54
/* This options allows to check user names given to CUPS-PDF additionally
55
against their lower case variants. This is necessary since in some
56
Windows environments only upper case user names are passed. Usually UNIX
57
user names are all lower case and it is save to use this option
58
but be aware that it can lead to mis-identifications in case
59
you have user names that differ only in upper/lower case.
60
check only against user name as passed to CUPS : 0
61
check additionally against lower case user name : 1 */
64
/* removing file name extensions before appending .pdf to output
65
extensions will only be removed if _both_ the following criteria are met:
66
- the extension (w/o the dot) is not longer than CPOUT characters
67
- the remaining filename has a minimal length of 1 character
68
set CPCUT to -1 in order to disable cutting
69
recommended values: pure UNIX environment : -1
70
mixed environments : 3 */
73
/* label all jobs with a unique job-id in order to avoid overwriting old
74
files in case new ones with identical names are created; always true for
76
0: label untitled documents only, 1: label all documents */
79
/* some installations require a domain prefix added to the user name
80
(special characters must be masked, e.g. \\ for a backslash)
81
leave blank for no prefix */
82
#define CPUSERPREFIX ""
84
/* if a prefix was defined above this switch toggels whether to include
85
the prefix in the output directory's name (if not $HOME) or not
86
0: do not include, 1: include */
89
/* CUPS-PDF log directory
90
/ set to "" (empty string) to disable all logging */
91
#define CPLOG "/var/log/cups"
95
/ 2: status (i.e. activity)
96
/ 4: debug - this will generate a lot of log-output!
97
/ add up values to combine options, i.e. 7 is full logging
98
/ if logging is disabled these setting have no effect */
101
/* user for anonymous PDF creation (this might be a security issue)
102
/ set to "" (empty string) to disable anonymous */
103
#define CPANONUSER "nobody"
105
/* directoryname for anonymously created PDF files
106
/ if anonymous access is disabled this setting has no effect */
107
#define CPANONDIRNAME "nobody"
109
/* umask for anonymous output
110
these are the _inverse_ permissions to be granted */
111
#define CPANONUMASK 0000
113
/* umask for user output of known users
114
changing this can introduce security leaks if confidential
115
information is processed! */
116
#define CPUSERUMASK 0077
118
/* group cups-pdf is supposed to run as - this will also be the gid for all
119
created directories and log files */
120
#define CPGRP "lpadmin"