免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1284 | 回复: 2
打印 上一主题 下一主题

[系统管理] Centos,CUPS + CUPS-Pdf,装好了,工作有问题。。。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-07-01 17:27 |只看该作者 |倒序浏览
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
已经装好,

看情况吧:
  1. [root@LinPrint cups]#
  2. [root@LinPrint cups]# pwd
  3. /etc/cups
  4. [root@LinPrint cups]#
  5. [root@LinPrint cups]#
  6. [root@LinPrint cups]# ls -l
  7. total 68
  8. -rw-------  1 root lp       0 May 11  2016 classes.conf
  9. -rw-r--r--  1 root lp       0 May 11  2016 client.conf
  10. -rw-r-----  1 root lp    2980 Oct 19 04:07 cupsd.conf
  11. -rw-r-----  1 root lp    4064 May 11  2016 cupsd.conf.default
  12. -rw-r-----  1 root lp    4165 Oct 18 22:21 cupsd.conf.O
  13. -rw-r-----  1 root root  4064 Oct 18 22:20 cupsd.conf.old
  14. -rw-r--r--  1 root root 11011 Oct 18 22:29 cups-pdf.conf
  15. -rw-r--r--  1 root root  9653 Oct 18 22:28 cups-pdf.conf.old
  16. drwxr-xr-x. 2 root root  4096 May 11  2016 interfaces
  17. -rw-r--r--  1 root lp       0 May 11  2016 lpoptions
  18. drwxr-xr-x. 2 root lp    4096 Oct 19 03:31 ppd
  19. -rw-------  1 root lp     526 Oct 19 03:32 printers.conf
  20. -rw-------  1 root lp     929 Oct 19 03:31 printers.conf.O
  21. -rw-r--r--  1 root lp     186 May 11  2016 snmp.conf
  22. drwx------. 2 root lp    4096 May 11  2016 ssl
  23. -rw-r--r--  1 root lp       0 May 11  2016 subscriptions.conf
  24. [root@LinPrint cups]#
  25. [root@LinPrint cups]# cat cups-pdf.conf
  26. #  cups-pdf.conf -- CUPS Backend Configuration (version 2.6.1, 2011-10-04)
  27. #  18.09.2005, Volker C. Behr
  28. #  Experimentelle Physik V, Universitaet Wuerzburg
  29. #  xxxk.uni-wuerzburg.de
  30. #  xxxw.cups-pdf.de
  31. #
  32. #
  33. #  This code may be freely distributed as long as this header
  34. #  is preserved. Changes to the code should be clearly indicated.   
  35. #
  36. #  This code is distributed under the GPL.
  37. #  xxxg/copyleft/gpl.html)
  38. #
  39. #  For more detailed licensing information see cups-pdf.c in the
  40. #  corresponding version number.                                    

  41. ###########################################################################
  42. #                                                                         #
  43. # This is the configuration file for CUPS-PDF. Values that are not set in #
  44. # here will use the defaults. Changes take effect immediately without the #
  45. # need for restarting any services.                                       #
  46. #                                                                         #
  47. # Take care not to add whitespaces at the end of a line!                  #
  48. #                                                                         #
  49. ###########################################################################


  50. ###########################################################################
  51. #                                                                         #
  52. # Path Settings                                                           #
  53. #                                                                         #
  54. ###########################################################################

  55. ### Key: Out
  56. ##  CUPS-PDF output directory
  57. ##  special qualifiers:
  58. ##     ${HOME} will be expanded to the user's home directory
  59. ##     ${USER} will be expanded to the user name
  60. ##  Add for Fedora (~/.config/user-dirs.dirs)
  61. ##     ${DESKTOP} will be expanded to the user's desktop directory
  62. ##  in case it is an NFS export make sure it is exported without
  63. ##  root_squash!
  64. ### Default: /var/spool/cups-pdf/${USER}

  65. #Out /var/spool/cups-pdf/${USER}
  66. #Out ${DESKTOP}
  67. Out /home/samba


  68. ### Key: AnonDirName
  69. ##  ABSOLUTE path for anonymously created PDF files
  70. ##  if anonymous access is disabled this setting has no effect
  71. ### Default: /var/spool/cups-pdf/ANONYMOUS

  72. #AnonDirName /var/spool/cups-pdf/ANONYMOUS
  73. AnonDirName /home/samba

  74. ### Key: Spool
  75. ##  CUPS-PDF spool directory - make sure there is no user 'SPOOL' on your
  76. ##  system or change the path
  77. ### Default: /var/spool/cups-pdf/SPOOL

  78. #Spool /var/spool/cups-pdf/SPOOL


  79. ###########################################################################
  80. #                                                                         #
  81. # Filename Settings                                                       #
  82. #                                                                         #
  83. ###########################################################################

  84. ### Key: Truncate
  85. ##  truncate long filenames to a maximum of <Truncate> characters
  86. ##  this does not consider the full path to the output but only the filename
  87. ##  without the .pdf-extension or a job-id prefix (see 'Label')
  88. ##  the minimal value is 8
  89. ### Default: 64

  90. #Truncate 64

  91. ### Key: Cut
  92. ##  removing file name extensions before appending .pdf to output
  93. ##  extensions will only be removed if _both_ the following criteria are met:
  94. ##   - the extension (w/o the dot) is not longer than <Cut> characters
  95. ##   - the remaining filename has a minimal length of 1 character
  96. ##  set Cut to -1 in order to disable cutting
  97. ##  recommended values: pure UNIX environment : -1
  98. ##                      mixed environments    :  3
  99. ### Default: 3

  100. #Cut 3

  101. ### Key: Label
  102. ##  label all jobs with a unique job-id in order to avoid overwriting old
  103. ##  files in case new ones with identical names are created; always true for
  104. ##  untitled documents
  105. ##  0: label untitled documents only
  106. ##  1: label all documents with a preceeding "job_#-"
  107. ##  2: label all documents with a tailing "-job_#"
  108. ### Default: 0

  109. #Label 0

  110. ### Key: TitlePref
  111. ##  where to look first for a title when creating the output filename
  112. ##  (title in PS file or title on commandline):
  113. ##  0: prefer title from %Title statement in the PS file
  114. ##  1: prefer title passed via commandline
  115. ### Default: 0

  116. #TitlePref 0


  117. ###########################################################################
  118. #                                                                         #
  119. # User Settings                                                           #
  120. #                                                                         #
  121. ###########################################################################

  122. ### Key: AnonUser
  123. ##  uid for anonymous PDF creation (this might be a security issue)
  124. ##  this setting has no influence on AnonDirName (see there)
  125. ##  set this to an empty value to disable anonymous
  126. ### Default: nobody

  127. #AnonUser nobody

  128. ### Key: LowerCase
  129. ##  This options allows to check user names given to CUPS-PDF additionally
  130. ##  against their lower case variants. This is necessary since in some
  131. ##  Windows environments only upper case user names are passed. Usually UNIX
  132. ##  user names are all lower case and it is save to use this option  
  133. ##  but be aware that it can lead to mis-identifications in case
  134. ##  you have user names that differ only in upper/lower case.
  135. ##     check only against user name as passed to CUPS  : 0
  136. ##     check additionally against lower case user name : 1
  137. ### Default: 1

  138. #LowerCase 1

  139. ### Key: UserPrefix
  140. ##  some installations require a domain prefix added to the user name
  141. ##  leave empty for no prefix
  142. ### Default: <empty>

  143. #UserPrefix

  144. ### Key: DirPrefix
  145. ##  if a prefix was defined above this switch toggels whether to include
  146. ##  the prefix in the output directory's name (if not $HOME) or not
  147. ##  0: do not include, 1: include
  148. ### Default: 0

  149. #DirPrefix 0

  150. ### Key: RemovePrefix
  151. ##  some installation pass usernames with a prefix (usually a domain name)
  152. ##  if you do not want this prefix to be used by the ${USER} variable for
  153. ##  output directories put the part which is to be cut here
  154. ### Default: <empty>

  155. #RemovePrefix


  156. ###########################################################################
  157. #                                                                         #
  158. # Security Settings                                                       #
  159. #                                                                         #
  160. ###########################################################################

  161. ### Key: AnonUMask
  162. ##  umask for anonymous output
  163. ##  these are the _inverse_ permissions to be granted
  164. ### Default: 0000

  165. #AnonUMask 0000

  166. ### Key: UserUMask
  167. ##  umask for user output of known users
  168. ##  changing this can introduce security leaks if confidential
  169. ##  information is processed!
  170. ### Default: 0077

  171. #UserUMask 0077

  172. ### Key: Grp
  173. ##  group cups-pdf is supposed to run as - this will also be the gid for all
  174. ##  created directories and log files
  175. ### Default: lp

  176. #Grp lp


  177. ###########################################################################
  178. #                                                                         #
  179. # Log Settings                                                            #
  180. #                                                                         #
  181. ###########################################################################

  182. ### Key: Log
  183. ##  CUPS-PDF log directory
  184. ##  set this to an empty value to disable all logging
  185. ### Default: /var/log/cups

  186. #Log /var/log/cups

  187. ### Key: LogType
  188. ##  log-mode
  189. ##  1: errors
  190. ##  2: status (i.e. activity)
  191. ##  4: debug - this will generate a lot of log-output!
  192. ##  add up values to combine options, i.e. 7 is full logging
  193. ##  if logging is disabled these setting have no effect
  194. ### Default: 3

  195. #LogType 3


  196. ###########################################################################
  197. #                                                                         #
  198. # PDF Conversion Settings                                                 #
  199. #                                                                         #
  200. ###########################################################################

  201. ### Key: GhostScript
  202. ##  location of GhostScript binary (gs)
  203. ##  MacOSX: for using pstopdf (recommended) set this to /usr/bin/pstopdf
  204. ##          or its proper location on your system
  205. ### Default: /usr/bin/gs

  206. #GhostScript /usr/bin/gs

  207. ### Key: GSTmp
  208. ##  location of temporary files during GhostScript operation
  209. ##  this must be user-writable like /var/tmp or /tmp !
  210. ### Default: /var/tmp

  211. #GSTmp /var/tmp

  212. ### Key: GSCall
  213. ## command line for calling GhostScript (!!! DO NOT USE NEWLINES !!!)
  214. ## MacOSX: for using pstopdf set this to %s %s -o %s %s
  215. ### Default: %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s

  216. #GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f %s

  217. ### Key: PDFVer
  218. ##  PDF version to be created - can be "1.5", "1.4", "1.3" or "1.2"
  219. ##  MacOSX: for using pstopdf set this to an empty value
  220. ### Default: 1.4

  221. #PDFVer 1.4

  222. ### Key: PostProcessing
  223. ##  postprocessing script that will be called after the creation of the PDF
  224. ##  as arguments the filename of the PDF, the username as determined by
  225. ##  CUPS-PDF and the one as given to CUPS-PDF will be passed
  226. ##  the script will be called with user privileges
  227. ##  set this to an empty value to use no postprocessing
  228. ### Default: <empty>

  229. #PostProcessing


  230. ###########################################################################
  231. #                                                                         #
  232. # Experimental Settings                                                   #
  233. #   These settings activate experimental options. If you decide to use    #
  234. #   them I would appreciate any feedback - including an 'ok' if they      #
  235. #   work as expected - so I can eventually put them into the non-         #
  236. #   experimental sections.                                                #
  237. #                                                                         #
  238. ###########################################################################

  239. ### Key: DecodeHexStrings
  240. ##  this option will try to decode hex strings in the title to allow
  241. ##  internationalized titles
  242. ##  (have a look at contrib/pstitleconv for a suitable filter for data
  243. ##   from Windows clients)
  244. ##  0: disable, 1: enable
  245. ### Default: 0

  246. #DecodeHexStrings 0

  247. ### Key: FixNewlines
  248. ##  this option will try to fix various unusal line delimiters (e.g.
  249. ##  form feeds)
  250. ##  especially useful when using non-Linux-generated files
  251. ##  0: disable, 1: enable
  252. ### Default: 0

  253. #FixNewlines 0
  254. [root@LinPrint cups]#
  255. [root@LinPrint cups]#
  256. [root@LinPrint cups]#
  257. [root@LinPrint cups]#
  258. [root@LinPrint cups]#
  259. [root@LinPrint cups]#
  260. [root@LinPrint cups]# cd /opt/samba
  261. [root@LinPrint samba]# ls -l
  262. total 168
  263. -rwxr--r-- 1 nobody nobody 169386 Sep 17  2014 IntelGFX.log
  264. [root@LinPrint samba]#
  265. [root@LinPrint samba]#
  266. [root@LinPrint samba]#
  267. [root@LinPrint samba]# lpstat -p
  268. printer Cups-PDF is idle.  enabled since Mon 19 Oct 2015 03:43:18 AM HKT
  269. [root@LinPrint samba]#
  270. [root@LinPrint samba]#
  271. [root@LinPrint samba]#
  272. [root@LinPrint samba]# lpr ./IntelGFX.log -P Cups-PDF
  273. [root@LinPrint samba]#
  274. [root@LinPrint samba]#
  275. [root@LinPrint samba]# ls /home/samba/
  276. cups-pdf-2.6.1-4.el6.i686.rpm  cups-pdf.txt  IntelGFX.pdf
  277. [root@LinPrint samba]#
  278. [root@LinPrint samba]#
复制代码
Cups-PDF的打印机确实存在的,
在Web界面,选择“Print Test Page",有测试页面的PDF文件输出,这个PDF文件FTP到WIN上,在Acrobat里面是打不开的。
上面日志,随便用命令行lpr IntelGFX.log,输出的PDF文件也是打不开的。。。

百思不得其解,也不知道是什么原因。。。。有经验到大大帮我看看? 感激不尽!

论坛徽章:
224
2022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:32操作系统版块每日发帖之星
日期:2016-02-18 06:20:00操作系统版块每日发帖之星
日期:2016-03-01 06:20:00操作系统版块每日发帖之星
日期:2016-03-02 06:20:0015-16赛季CBA联赛之上海
日期:2019-09-20 12:29:3219周年集字徽章-周
日期:2019-10-01 20:47:4815-16赛季CBA联赛之八一
日期:2020-10-23 18:30:5320周年集字徽章-20	
日期:2020-10-28 14:14:2615-16赛季CBA联赛之广夏
日期:2023-02-25 16:26:26CU十四周年纪念徽章
日期:2023-04-13 12:23:1015-16赛季CBA联赛之四川
日期:2023-07-25 16:53:45操作系统版块每日发帖之星
日期:2016-05-10 19:22:58
2 [报告]
发表于 2016-07-01 19:51 来自手机 |只看该作者
本帖最后由 action08 于 2016-07-01 19:52 编辑

有打印到文件的选项

论坛徽章:
0
3 [报告]
发表于 2016-07-01 21:40 |只看该作者
action08 发表于 2016-07-01 19:51
有打印到文件的选项


CUPS-Pdf本来就是一个虚拟的文件打印机,不存在还要选择打印到文件的选项吧.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP