fail:
carl@asus17:~/tss$ python -c "import poppler; poppler.document_new_from_data('\x00',1,password='')"
Xlib: extension "RANDR" missing on display "localhost:13.0".
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: document_new_from_data() argument 1 must be string without null bytes, not str
pass:
juser@cp666:~/temp$ python -c "import poppler; poppler.document_new_from_data('\x00',1,password='')"
Xlib: extension "RANDR" missing on display "localhost:10.0".
Error: May not be a PDF file (continuing anyway)
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
Traceback (most recent call last):
File "<string>", line 1, in <module>
glib.GError: PDF document is damaged
simple test:
fail: document_ new_from_ data('\ x00',1, password= '')" new_from_ data() argument 1 must be string without null bytes, not str
carl@asus17:~/tss$ python -c "import poppler; poppler.
Xlib: extension "RANDR" missing on display "localhost:13.0".
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: document_
pass: document_ new_from_ data('\ x00',1, password= '')"
juser@cp666:~/temp$ python -c "import poppler; poppler.
Xlib: extension "RANDR" missing on display "localhost:10.0".
Error: May not be a PDF file (continuing anyway)
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
Traceback (most recent call last):
File "<string>", line 1, in <module>
glib.GError: PDF document is damaged
yeah, 0 is not a valid pdf. that's not the point.