you can "just" enforce pdf/a

...well there is like 50 different pdf/a versions; just pick one of them :)

That and only commercial pdf libraries support PDF/A. Apperantly, it is much harder than regular PDF so open source libs dont bother.

I am currently building (as a side-project) an easy converter from PDF to PDF/A (PDF/A-3b)... a negative being that it is mostly based on Ghostscript, which is Affero GPL (mainly because Ghostscript makers also make money selling commercial licenses); and that in case of weird font, I just convert all fonts to bitmaps ( https://bugs.ghostscript.com/show_bug.cgi?id=708479 ). It's not done yet though... I am going through verapdf PDF/A testsuite ( https://github.com/veraPDF/veraPDF-corpus ) and still catching bugs

As a producer of PDF files I mainly work with PDF/A. It's not particularly hard, just need to embed some information regarding colour space and fonts.

I use PDFBox for this purpose, it's Apache licensed.