FoomaticRIPCommandLine fails

未关闭
#13 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
perl, shell
领域
tooling

调研方向

Start by reproducing the reported FoomaticRIPCommandLine case with a title containing "Antrag%20WM.pdf", then trace how the Perl engine constructs and invokes the shell command. Done means the generated command accepts such document titles without a printf error and the print job proceeds.

由索引模型根据 Issue 内容生成。

描述

I am using a ppd printer from ricoh (Ricoh IM C3010 PS) including the following FoomaticRIPCommandLine:

%%%%Title: (&title;)
%%
%%\n%A%B%C%D"%%%%; /bin/cat;"
*End

If &title; is substituted e.g. with "Antrag%20WM.pdf", the command line fails with: %20W invalid directive

D [16/Sep/2025:11:48:08 +0200] [Job 64858] %%%%Title: (Antrag%20WM.pdf)
D [16/Sep/2025:11:48:08 +0200] [Job 64858] %%
D [16/Sep/2025:11:48:08 +0200] [Job 64858] %%\\n/isGenuine{\\n2 dict begin\\n/isGenuineFlag //false def\\n//systemdict /execdict known  {\\n   //systemdict /execdict get /copyright known {\\n       /copyright //systemdict /execdict get /copyright get def\\n       { copyright ( ) anchorsearch {\\n               pop /copyright exch def\\n           }{\\n               pop\\n               exit\\n           } ifelse\\n       } loop\\n
D [16/Sep/2025:11:48:08 +0200] [Job 64858] copyright ((c) Copyright 1984-) anchorsearch {\\n           pop pop\\n           copyright ( Adobe Systems Incorporated) search {\\n               pop pop pop\\n               copyright (All Rights Reserved.) search {\\n                   pop pop pop\\n                   /isGenuineFlag //true def\\n               }{\\n                   pop\\n               } ifelse\\n           }{\\n               pop\\n           } ifelse\\n       }{\\n           pop\\n       } ifelse\\n   } if\\n} if\\nisGenuineFlag\\nend\\n}bind def\\nmark {\\n    userdict /86f6369627 known { userdict /86f6369627 get /+DrvMode 1 put } if\\n} stopped cleartomark\\n/usrid(konstanz)def\\n/lppswd()def\\n/dspswd()def\\n/usrcode()def\\n/sppswd()def\\nmark\\n/usrcode where{pop}{/usrcode()def}ifelse\\n/usrid where{pop}{/usrid()def}ifelse\\n(konstanz) usrcode (20`date +%y%m%d%R | sed \'s/://\'`) {setuserinfo} stopped\\ncleartomark\\nmark {\\n<<\\n   /JobType 0\\n   /JobInfo <<\\n      /UserID usrid\\n      /Time (20`date +%y%m%d%R | sed \'s/://\'`)\\n      /HostLoginName (konstanz)\\n      /HostName (printers)\\n   >>\\n>> /RDeviceProcSet /ProcSet findresource /SetJobType get exec\\n}stopped cleartomark\\n/cbbrightness 0 def\\n/cbcontrast 0 def\\n/cbblack 0 def\\n/cbcyan 0 def\\n/cbmagenta 0 def\\n/cbyellow 0 def\\nmark{\\n<</OutputType null>>setpagedevice\\n} stopped cleartomark\\nmark{\\nuserdict /RPS_BPdict 2 dict put\\nuserdict /RPS_BPdict get begin /RPS_BP_MEDIAPOSITION null def end\\n} stopped cleartomark\\nmark{\\nuserdict /RPS_BPdict get begin\\n/RPS_BP_MEDIATYPE (Auto) def end\\n} stopped cleartomark\\nmark{\\n<<\\n/BannerPageMode false\\n/MediaPosition null\\n/MediaType null\\n>>\\n/RDeviceProcSet\\n/ProcSet findresource\\n/SetBannerPage get exec\\n} stopped cleartomark\\n\"%%%%; cat;\"
D [16/Sep/2025:11:48:08 +0200] [Job 64858] Starting process \"kid3\" (generation 1)
D [16/Sep/2025:11:48:08 +0200] [Job 64858] Starting process \"kid4\" (generation 2)
D [16/Sep/2025:11:48:08 +0200] [Job 64858] Starting process \"renderer\" (generation 2)
D [16/Sep/2025:11:48:08 +0200] [Job 64858] JCL: \033%-12345X@PJL
D [16/Sep/2025:11:48:08 +0200] [Job 64858] <job data>
D [16/Sep/2025:11:48:08 +0200] [Job 64858] /bin/sh: 1: printf: %20W: invalid directive
D [16/Sep/2025:11:48:08 +0200] [Job 64858] renderer exited with status 2

I think the title is produced by a Webbrowser-PDF-Previewer on a Linux oder Mac-computer using cups as print system. The document title in fact is "Antrag WM.pdf".

主要语言
Perl
星标
8
派生
5
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenPrinting/foomatic-db-engine 的其他 Issue

查看 OpenPrinting/foomatic-db-engine 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。