- 论坛徽章:
- 0
|
Centos环境
用yum install cups
CUPS装好,配置好了(以前搞过USB的打印机,这个里面应该不会错)
CUPS Web管理页面能进去
Cups-PDF是从官网下载的cups-pdf-2.6.1-4.el6.i686
rpm -ivh cups-pdf-2.6.1-4.el6.i686
已经装好,
看情况吧:- [root@LinPrint cups]#
- [root@LinPrint cups]# pwd
- /etc/cups
- [root@LinPrint cups]#
- [root@LinPrint cups]#
- [root@LinPrint cups]# ls -l
- total 68
- -rw------- 1 root lp 0 May 11 2016 classes.conf
- -rw-r--r-- 1 root lp 0 May 11 2016 client.conf
- -rw-r----- 1 root lp 2980 Oct 19 04:07 cupsd.conf
- -rw-r----- 1 root lp 4064 May 11 2016 cupsd.conf.default
- -rw-r----- 1 root lp 4165 Oct 18 22:21 cupsd.conf.O
- -rw-r----- 1 root root 4064 Oct 18 22:20 cupsd.conf.old
- -rw-r--r-- 1 root root 11011 Oct 18 22:29 cups-pdf.conf
- -rw-r--r-- 1 root root 9653 Oct 18 22:28 cups-pdf.conf.old
- drwxr-xr-x. 2 root root 4096 May 11 2016 interfaces
- -rw-r--r-- 1 root lp 0 May 11 2016 lpoptions
- drwxr-xr-x. 2 root lp 4096 Oct 19 03:31 ppd
- -rw------- 1 root lp 526 Oct 19 03:32 printers.conf
- -rw------- 1 root lp 929 Oct 19 03:31 printers.conf.O
- -rw-r--r-- 1 root lp 186 May 11 2016 snmp.conf
- drwx------. 2 root lp 4096 May 11 2016 ssl
- -rw-r--r-- 1 root lp 0 May 11 2016 subscriptions.conf
- [root@LinPrint cups]#
- [root@LinPrint cups]# cat cups-pdf.conf
- # cups-pdf.conf -- CUPS Backend Configuration (version 2.6.1, 2011-10-04)
- # 18.09.2005, Volker C. Behr
- # Experimentelle Physik V, Universitaet Wuerzburg
- # xxxk.uni-wuerzburg.de
- # xxxw.cups-pdf.de
- #
- #
- # This code may be freely distributed as long as this header
- # is preserved. Changes to the code should be clearly indicated.
- #
- # This code is distributed under the GPL.
- # xxxg/copyleft/gpl.html)
- #
- # For more detailed licensing information see cups-pdf.c in the
- # corresponding version number.
- ###########################################################################
- # #
- # This is the configuration file for CUPS-PDF. Values that are not set in #
- # here will use the defaults. Changes take effect immediately without the #
- # need for restarting any services. #
- # #
- # Take care not to add whitespaces at the end of a line! #
- # #
- ###########################################################################
- ###########################################################################
- # #
- # Path Settings #
- # #
- ###########################################################################
- ### Key: Out
- ## CUPS-PDF output directory
- ## special qualifiers:
- ## ${HOME} will be expanded to the user's home directory
- ## ${USER} will be expanded to the user name
- ## Add for Fedora (~/.config/user-dirs.dirs)
- ## ${DESKTOP} will be expanded to the user's desktop directory
- ## in case it is an NFS export make sure it is exported without
- ## root_squash!
- ### Default: /var/spool/cups-pdf/${USER}
- #Out /var/spool/cups-pdf/${USER}
- #Out ${DESKTOP}
- Out /home/samba
- ### Key: AnonDirName
- ## ABSOLUTE path for anonymously created PDF files
- ## if anonymous access is disabled this setting has no effect
- ### Default: /var/spool/cups-pdf/ANONYMOUS
- #AnonDirName /var/spool/cups-pdf/ANONYMOUS
- AnonDirName /home/samba
- ### Key: Spool
- ## CUPS-PDF spool directory - make sure there is no user 'SPOOL' on your
- ## system or change the path
- ### Default: /var/spool/cups-pdf/SPOOL
- #Spool /var/spool/cups-pdf/SPOOL
- ###########################################################################
- # #
- # Filename Settings #
- # #
- ###########################################################################
- ### Key: Truncate
- ## truncate long filenames to a maximum of <Truncate> characters
- ## this does not consider the full path to the output but only the filename
- ## without the .pdf-extension or a job-id prefix (see 'Label')
- ## the minimal value is 8
- ### Default: 64
- #Truncate 64
- ### Key: Cut
- ## removing file name extensions before appending .pdf to output
- ## extensions will only be removed if _both_ the following criteria are met:
- ## - the extension (w/o the dot) is not longer than <Cut> characters
- ## - the remaining filename has a minimal length of 1 character
- ## set Cut to -1 in order to disable cutting
- ## recommended values: pure UNIX environment : -1
- ## mixed environments : 3
- ### Default: 3
- #Cut 3
- ### Key: Label
- ## label all jobs with a unique job-id in order to avoid overwriting old
- ## files in case new ones with identical names are created; always true for
- ## untitled documents
- ## 0: label untitled documents only
- ## 1: label all documents with a preceeding "job_#-"
- ## 2: label all documents with a tailing "-job_#"
- ### Default: 0
- #Label 0
- ### Key: TitlePref
- ## where to look first for a title when creating the output filename
- ## (title in PS file or title on commandline):
- ## 0: prefer title from %Title statement in the PS file
- ## 1: prefer title passed via commandline
- ### Default: 0
- #TitlePref 0
- ###########################################################################
- # #
- # User Settings #
- # #
- ###########################################################################
- ### Key: AnonUser
- ## uid for anonymous PDF creation (this might be a security issue)
- ## this setting has no influence on AnonDirName (see there)
- ## set this to an empty value to disable anonymous
- ### Default: nobody
- #AnonUser nobody
- ### Key: LowerCase
- ## This options allows to check user names given to CUPS-PDF additionally
- ## against their lower case variants. This is necessary since in some
- ## Windows environments only upper case user names are passed. Usually UNIX
- ## user names are all lower case and it is save to use this option
- ## but be aware that it can lead to mis-identifications in case
- ## you have user names that differ only in upper/lower case.
- ## check only against user name as passed to CUPS : 0
- ## check additionally against lower case user name : 1
- ### Default: 1
- #LowerCase 1
- ### Key: UserPrefix
- ## some installations require a domain prefix added to the user name
- ## leave empty for no prefix
- ### Default: <empty>
- #UserPrefix
- ### Key: DirPrefix
- ## if a prefix was defined above this switch toggels whether to include
- ## the prefix in the output directory's name (if not $HOME) or not
- ## 0: do not include, 1: include
- ### Default: 0
- #DirPrefix 0
- ### Key: RemovePrefix
- ## some installation pass usernames with a prefix (usually a domain name)
- ## if you do not want this prefix to be used by the ${USER} variable for
- ## output directories put the part which is to be cut here
- ### Default: <empty>
- #RemovePrefix
- ###########################################################################
- # #
- # Security Settings #
- # #
- ###########################################################################
- ### Key: AnonUMask
- ## umask for anonymous output
- ## these are the _inverse_ permissions to be granted
- ### Default: 0000
- #AnonUMask 0000
- ### Key: UserUMask
- ## umask for user output of known users
- ## changing this can introduce security leaks if confidential
- ## information is processed!
- ### Default: 0077
- #UserUMask 0077
- ### Key: Grp
- ## group cups-pdf is supposed to run as - this will also be the gid for all
- ## created directories and log files
- ### Default: lp
- #Grp lp
- ###########################################################################
- # #
- # Log Settings #
- # #
- ###########################################################################
- ### Key: Log
- ## CUPS-PDF log directory
- ## set this to an empty value to disable all logging
- ### Default: /var/log/cups
- #Log /var/log/cups
- ### Key: LogType
- ## log-mode
- ## 1: errors
- ## 2: status (i.e. activity)
- ## 4: debug - this will generate a lot of log-output!
- ## add up values to combine options, i.e. 7 is full logging
- ## if logging is disabled these setting have no effect
- ### Default: 3
- #LogType 3
- ###########################################################################
- # #
- # PDF Conversion Settings #
- # #
- ###########################################################################
- ### Key: GhostScript
- ## location of GhostScript binary (gs)
- ## MacOSX: for using pstopdf (recommended) set this to /usr/bin/pstopdf
- ## or its proper location on your system
- ### Default: /usr/bin/gs
- #GhostScript /usr/bin/gs
- ### Key: GSTmp
- ## location of temporary files during GhostScript operation
- ## this must be user-writable like /var/tmp or /tmp !
- ### Default: /var/tmp
- #GSTmp /var/tmp
- ### Key: GSCall
- ## command line for calling GhostScript (!!! DO NOT USE NEWLINES !!!)
- ## MacOSX: for using pstopdf set this to %s %s -o %s %s
- ### Default: %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s
- #GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s
- ### Key: PDFVer
- ## PDF version to be created - can be "1.5", "1.4", "1.3" or "1.2"
- ## MacOSX: for using pstopdf set this to an empty value
- ### Default: 1.4
- #PDFVer 1.4
- ### Key: PostProcessing
- ## postprocessing script that will be called after the creation of the PDF
- ## as arguments the filename of the PDF, the username as determined by
- ## CUPS-PDF and the one as given to CUPS-PDF will be passed
- ## the script will be called with user privileges
- ## set this to an empty value to use no postprocessing
- ### Default: <empty>
- #PostProcessing
- ###########################################################################
- # #
- # Experimental Settings #
- # These settings activate experimental options. If you decide to use #
- # them I would appreciate any feedback - including an 'ok' if they #
- # work as expected - so I can eventually put them into the non- #
- # experimental sections. #
- # #
- ###########################################################################
- ### Key: DecodeHexStrings
- ## this option will try to decode hex strings in the title to allow
- ## internationalized titles
- ## (have a look at contrib/pstitleconv for a suitable filter for data
- ## from Windows clients)
- ## 0: disable, 1: enable
- ### Default: 0
- #DecodeHexStrings 0
- ### Key: FixNewlines
- ## this option will try to fix various unusal line delimiters (e.g.
- ## form feeds)
- ## especially useful when using non-Linux-generated files
- ## 0: disable, 1: enable
- ### Default: 0
- #FixNewlines 0
- [root@LinPrint cups]#
- [root@LinPrint cups]#
- [root@LinPrint cups]#
- [root@LinPrint cups]#
- [root@LinPrint cups]#
- [root@LinPrint cups]#
- [root@LinPrint cups]# cd /opt/samba
- [root@LinPrint samba]# ls -l
- total 168
- -rwxr--r-- 1 nobody nobody 169386 Sep 17 2014 IntelGFX.log
- [root@LinPrint samba]#
- [root@LinPrint samba]#
- [root@LinPrint samba]#
- [root@LinPrint samba]# lpstat -p
- printer Cups-PDF is idle. enabled since Mon 19 Oct 2015 03:43:18 AM HKT
- [root@LinPrint samba]#
- [root@LinPrint samba]#
- [root@LinPrint samba]#
- [root@LinPrint samba]# lpr ./IntelGFX.log -P Cups-PDF
- [root@LinPrint samba]#
- [root@LinPrint samba]#
- [root@LinPrint samba]# ls /home/samba/
- cups-pdf-2.6.1-4.el6.i686.rpm cups-pdf.txt IntelGFX.pdf
- [root@LinPrint samba]#
- [root@LinPrint samba]#
复制代码 Cups-PDF的打印机确实存在的,
在Web界面,选择“Print Test Page",有测试页面的PDF文件输出,这个PDF文件FTP到WIN上,在Acrobat里面是打不开的。
上面日志,随便用命令行lpr IntelGFX.log,输出的PDF文件也是打不开的。。。
百思不得其解,也不知道是什么原因。。。。有经验到大大帮我看看? 感激不尽!
|
|