A password is asked although Adobe opens the document without one when the document is encrypted with "Encryption of data using the RC4 or AES algorithms with a file encryption key length of 40 bits." - Version 1 (V 1) Revision 2 (R 2).
Similar cases (V1 R3 and V2 R3) are handled in the following item: PdfViewer: A password is asked although Adobe opens the document without one.
According to the PDF specification (AdobeĀ® Portable Document Format Version 1.7):
Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions width and height in user space.
The operation:
x y width height re
An invalid case:
0 - 595 -842 re
This leads to an exception thrown: System.NullReferenceException: 'Object reference not set to an instance of an object.'
As a result, the glyphs are not measured and positioned properly. The issue applies to the TrueType and Type1 fonts.
The document will be imported with a loss of content. The reason is that ASCII85Decoder will throw an ArgumentException when the stream doesn't end with '~>'. Although this is invalid case according to PDF specification, other applications are handling it and the document is successfully visualized in them. We may also consider implementing workaround that handles such invalid streams.