How is your data modeling done? I mean does your different type of documents are part of different spaces or a space will have any type of document?
e.g. Is there a different space for all pdf documents? for all word documents etc? and you want to restrict permission based on doc type? or a space can have pdf doc/word doc etc. and you want to restrict permission based on doc type?