linmaogithub / pdfium

Automatically exported from code.google.com/p/pdfium
0 stars 0 forks source link

PDF stream is compressed twice #206

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open attached file produced by pdfium
2. Try to convert to PostScript

What is the expected output? What do you see instead?

The PDF produced by PDFium is bad.
Object 18 0 says:

18 0 obj
<</Filter[/FlateDecode/FlateDecode]/Length 10>>stream
x^c@^@^@^@^K^@^A
endstream

i.e. it claims to be compressed twice by Deflate/Inflate.
After decompressing it once, you get 11 \0 bytes. These clearly do not
represent a valid compressed zlib-bytestream.

Original issue reported on code.google.com by korob...@google.com on 30 Sep 2015 at 2:37

Attachments:

GoogleCodeExporter commented 8 years ago
How did you produce the file with PDFium? What revision is your PDFium checkout 
at?

Original comment by thestig@chromium.org on 1 Oct 2015 at 10:23

GoogleCodeExporter commented 8 years ago
PDF was generated by https://tickets.exponews.com.au/684 and I don't know what 
PDFium they use. 

Original comment by korob...@google.com on 2 Oct 2015 at 3:35

GoogleCodeExporter commented 8 years ago
Do you care to ask? It's not obvious how to reproduce the generation of 
14112-e.pdf.

Original comment by thestig@chromium.org on 6 Oct 2015 at 1:39

GoogleCodeExporter commented 8 years ago
Who do I ask? 
Maybe you could check the code and see if you're testing for the stream to be 
already compressed/valid before compressing it?

Original comment by korob...@google.com on 7 Oct 2015 at 6:55

GoogleCodeExporter commented 8 years ago
The website that generated the PDF. They should know how they generated that 
PDF.

It's not immediately obvious how they used PDFium to generate the PDF in 
question. For all we know, the section that troubles you may have simply passed 
through. Also, what revision of PDFium did they use? Were there any local 
modifications?

Original comment by thestig@chromium.org on 7 Oct 2015 at 7:17

GoogleCodeExporter commented 8 years ago
Basically, imagine if I took a HTML file with the comment <!-- Generated by 
Google Docs //--> in it, and file a bug against Docs simply saying the HTML 
file is bad. What would you expect the Google Docs engineer to do with just 
that information?

Original comment by thestig@chromium.org on 7 Oct 2015 at 7:20

GoogleCodeExporter commented 8 years ago

Original comment by thestig@chromium.org on 9 Oct 2015 at 2:05