GhostScript(9.20,AIX)错误将PDF转换为PCL

时间:2017-03-06 14:51:07

标签: pdf ghostscript printer-control-language

GhostScript 9.20在尝试将1页PDF转换为PCL时出现以下错误:

**** Error reading a content stream. The page may be incomplete.
               Output may be incorrect.
Error: /typecheck in --run--
Operand stack:
   --dict:4/4(L)--   9   11150   9   0   --nostringval--   AP   --nostringval--   BS   --nostringval--   DA   (/Helv 10 Tf 0 g)   F   4   FT   Tx   Ff   12587008   MK   --nostringval--   P   --nostringval--   Rect   --nostringval--   Subtype   Widget   T   (MissingInformation)   Type   V   --nostringval--   Annot
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1983   1   3   %oparray_pop   1982   1   3   %oparray_pop   1966   1   3   %oparray_pop   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1205/1684(ro)(G)--   --dict:1/20(G)--   --dict:83/200(L)--   --dict:83/200(L)--   --dict:135/256(ro)(G)--   --dict:291/300(ro)(G)--   --dict:30/32(L)--
Current allocation mode is local
GPL Ghostscript 9.20: Unrecoverable error, exit code 1

它在Unix-AIX中执行,具有以下内容:

gs -dSAFER -sDEVICE=pxlmono -sPAPERSIZE=letter -dFIXEDMEDIA -dPDFFitPage

Sample file that fails

任何想法都将不胜感激!

谢谢,

罗恩

1 个答案:

答案 0 :(得分:0)

您的PDF文件有错误。它包含一个具有(对象9):

的注释

/ V /APPIIAGE#20CASEONED#3A#0D#0D...Part#20II#3A#20DrugExperimentation#20-#20Drugs#2FMedication#20Not#20Prescribed#AA#20Was#20doctor#20seen#3F#20Provide#20detail #20if#20yes。#0D#0D ...零件编号20II#3A#20AlcoholDrugTreatment#20-#20Alcohol#20Abuse#20Treatment#3A#20Was#20doctor#20seen#3F#20Provide#20detail#20if#20yes。#0D# 0D ...零件编号20II#3A#20HivAids#20-#20HIV#3A#20Was#20doctor#20seen#3F#20Provide#20detail#20if#20yes。#0D#0D ...零件编号20II#3A#20HivAids# 20-#20AIDS#3A#20Was#20doctor#20seen#3F#20Provide#20detail#20if#20yes。#0D#0D ...零件编号20II#3A#20LiverDisease#20-#20Esophagus#20Disorder#3A#20Was#20doctor #20seen#3F#20Provide#20detail#20if#20yes。#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Stress#3A#20Have#20you#20ever#20received#20disability# 20or#20missed#20work#20due#20to#20psychiatric#20reasons#3F#20Provide#20details#20if#20yes。#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Stress#3A #20Do#20you#20see#20A#20psychiatrist#20or#20counselor#3F#20Provide#20details#20if#20yes #0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Stress#3A#20Was#20doctor#20seen#3F#20Provide#20detail#20if#20yes。#0D#0D .. 。部分#20II#3A#20MentalDisorder#20-#20Counseling#20-#20Stress#3A#20support#20group#20member#20info#20missing#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling# 20-#20Stress#3A#20date#20diagnosed#20missing#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Depression#3A#20Have#20you#20ever#20received#20disability#20or #20missed#20work#20due#20to#20psychiatric#20reasons#3F#20Provide#20details#20if#20yes。#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Depression#3A# 20Do#20you#20see#20A#20psychiatrist#20or#20counselor#3F#20Provide#20details#20if#20yes。#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Depression#3A #20Was#20doctor#20seen#3F#20Provide#20detail#20if#20yes。#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Depression#3A#20support#20group#20member# 20info#20missing#0D#0D ...零件编号20II#3A#20MentalDiso刻申#20-#20Counseling#20-#20Depression#3A#20date#20diagnosed#20missing#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Anxiety#3A#20Have#20you# 20ever#20received#20disability#20or#20missed#20work#20due#20to#20psychiatric#20reasons#3F#20Provide#20details#20if#20yes。#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling# 20-#20Anxiety#3A#20Do#20you#20see#20A#20psychiatrist#20or#20counselor#3F#20Provide#20details#20if#20yes。#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling #20-#20Anxiety#3A#20Was#20doctor#20seen#3F#20Provide#20detail#20if#20yes。#0D#0D ...零件编号20II#3A#20MentalDisorder#20-#20Counseling#20-#20Anxiety#3A #20support#20group#20member#20info#20missing#0D#0D#28Continued#20on#20next#20page#29

注释的/ V字段可以是文本字符串或流。此批注具有名称对象。所以它立即不正确。除此之外,名称对象受实施限制的约束,该限制在PDF参考文献的附录C中给出为127字节,这远远小于这个怪物。 Ghostscript允许更大的名字,但不是这么大。

即使我'修复',Ghostscript仍然不喜欢该文件,如果你在Acrobat中打开文件,然后关闭它,它提供'保存更改',这是一个很好的迹象表明Acrobat有默默地忽略了错误。

实际上,文件已被编辑,编辑进一步破坏了文件。

简而言之,您的文件已损坏,这就是它无效的原因。