linux纯文本图片查看器,linux – 如何生成在文档查看器中工作的纯文本源代码PDF示例?...

我刚发现帖子

Adobe Forums: Simple Text String Example in specification broken.,所以我有兴趣找到纯文本源代码PDF示例.

所以,通过这篇文章,我最终发现:

PDF 1.7规范见第699页附录“_Annex H(资料性)PDF文件示例”;从那里,我想尝试“H.3简单文本字符串示例”(“经典Hello World”).

所以我试着把它保存为hello.pdf(_例外注意当你从PDF32000_2008.pdf复制时,你可能得到“%PDF-1.4” – 也就是说,在1.之后插入一个空格,必须将其删除_):

%PDF-1.4

1 0 obj

<< /Type /Catalog

/Outlines 2 0 R

/Pages 3 0 R

>>

endobj

2 0 obj

<< /Type /Outlines

/Count 0

>>

endobj

3 0 obj

<< /Type /Pages

/Kids [ 4 0 R ]

/Count 1

>>

endobj

4 0 obj

<< /Type /Page

/Parent 3 0 R

/MediaBox [ 0 0 612 792 ]

/Contents 5 0 R

/Resources << /ProcSet 6 0 R

/Font << /F1 7 0 R >>

>>

>>

endobj

5 0 obj

<< /Length 73 >>

stream

BT

/F1 24 Tf

100 100 Td

( Hello World ) Tj

ET

endstream

endobj

……我正试图打开它:

evince hello.pdf

…然而,evince无法打开它:“无法打开文档/ PDF文档已损坏”;并且:

Error: PDF file is damaged - attempting to reconstruct xref table...

Error: Couldn't find trailer dictionary

Error: Couldn't read xref table

我还查看了qpdf:

$qpdf --check hello.pdf

WARNING: hello.pdf: file is damaged

WARNING: hello.pdf: can't find startxref

WARNING: hello.pdf: Attempting to reconstruct cross-reference table

hello.pdf: unable to find trailer dictionary while recovering damaged file

我哪里错了?

非常感谢任何答案,

干杯!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值