简体   繁体   中英

Failed to open self created pdf with Adobe Reader

Here's a hello world Pdf creatred by my self.It's xref info is store in XRefStm .How every it failed open with Adobe Reader.Can some body tell me the reason ? Thank you in advance!

RoyDeng.

%PDF-1.7
1 0 obj << /Length 94 >>stream
BT 10 782 Td /0 50 Tf 50 TL (Hello)' (World)' (OK)Tj (World)' Tj ET
endstream endobj
2 0 obj << /Count 1 /Kids 3 0 R /Type /Pages >> endobj
3 0 obj [ 4 0 R ] endobj
4 0 obj << /Contents 5 0 R /MediaBox 6 0 R /Parent 2 0 R /Resources 10 0 R /Type /Page >> endobj
5 0 obj [ 1 0 R ] endobj
6 0 obj [ 0 0 612 792 ] endobj
7 0 obj << /BaseFont /Helvetica /Encoding /MacRomanEncoding /Subtype /Type1 /Type /Font >> endobj
8 0 obj << /0 7 0 R >> endobj
9 0 obj [ /PDF /Text ] endobj
10 0 obj << /Font 8 0 R /ProcSet 9 0 R >> endobj
11 0 obj << /Pages 2 0 R /Type /Catalog /PageLayout /OneColumn >> endobj
12 0 obj << /Type /XRef /Index [0 11] /W [1 4 1] /Filter /ASCIIHexDecode /Size 12 /Length 144 /Root 11 0 R >>stream
00 00000000 00
01 00000009 00
01 0000009A 00
01 000000D1 00
01 000000EA 00
01 0000014B 00
01 00000164 00
01 00000183 00
01 000001E5 00
01 00000203 00
01 00000221 00
01 00000252 00
endstream
endobj
startxref
667
%%EOF

I tried to fix this code with pdftk

pdftk 1.pdf output fixed.pdf
Error: Failed to open PDF file: 
   1.pdf
Errors encountered.  No output created.
Done.  Input errors, so no output created.

then I tried with cpdftk (from coherent), and gained further info

#  cpdftk 1.pdf output fixed.pdf
cpdf could not read the file. Technical details follow:

Could not read x-ref table

finally I tried to fix file with Multivalent.jar

and Multivalent repaired pdf (I attach the result)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM