When Separation color space with "name" set as None it is falling back to an "alternateSpace" (color space) instead.
From the Pdf specification:
A Separation color space is defined as follows:
[ /Separation name alternateSpace tintTransform ]
Observed:
The None value is ignored and the color space fallbacks to the Lab color space.
When importing a document containing an EI keyword not followed by space or return an exception is thrown: EndOfStreamException: 'Attempted to read past the end of the stream.'
When importing a PDF document and parsing a name start character followed by a dictionary end one an exception is thrown: System.InvalidOperationException: 'Stack empty.'
With the current implementation, the permissions are ignored on import.
As a side note, there is an option to set permissions on export: UserAccessPermissions.
Importing a document containing an EI keyword within the image stream leads to an endless loop and the document is not imported successfully.
Setting a filter on a mask results in an invalid file when exporting.
Workaround: Set the filer like this:
PdfFormatProvider provider = new PdfFormatProvider();
provider.ExportSettings.ImageCompression = new ImageFilterTypes[] { ImageFilterTypes.FlateDecode };