Decompress now non-lazy. Otherwise, deferred decryption fails due to

modification of object map inside iter.
This commit is contained in:
John Whitington 2017-01-04 17:52:14 +00:00
parent b25bcdca12
commit b7807f8a94
2 changed files with 30 additions and 1 deletions

View File

@ -3410,7 +3410,7 @@ let go () =
| _ -> error "Copy Box: bad command line" | _ -> error "Copy Box: bad command line"
end end
| Some Decompress -> | Some Decompress ->
let pdf = get_single_pdf (Some Decompress) true in let pdf = get_single_pdf (Some Decompress) false in
Pdf.iter_stream Pdf.iter_stream
(function stream -> (function stream ->
try Pdfcodec.decode_pdfstream_until_unknown pdf stream with try Pdfcodec.decode_pdfstream_until_unknown pdf stream with

29
hello.pdf Normal file
View File

@ -0,0 +1,29 @@
%PDF-1.1
%€<>ƒ
1 0 obj
<</Type/Pages/Kids[3 0 R]/Count 1>>
endobj
2 0 obj
<</Length 49>>
stream
1 0 0 1 50 770 cm BT/F0 36 Tf(Hello, World!)Tj ET
endstream
endobj
3 0 obj
<</Type/Page/Parent 1 0 R/Resources<</Font<</F0<</Type/Font/Subtype/Type1/BaseFont/Times-Italic>>>>>>/MediaBox[0 0 595.275590551 841.88976378]/Rotate 0/Contents[2 0 R]>>
endobj
4 0 obj
<</Type/Catalog/Pages 1 0 R>>
endobj
xref
0 5
0000000000 65535 f
0000000015 00000 n
0000000066 00000 n
0000000163 00000 n
0000000348 00000 n
trailer
<</ID[(èÎ25³/°q:Oʇ°u‰)(èÎ25³/°q:Oʇ°u‰)]/Root 4 0 R/Size 5>>
startxref
393
%%EOF