I found a way to add the StructTreeRoot and the MarkInfo entry with PDF/A compliance (C#):
Code:
private void createPDF(){
PdfDocument document = new PdfDocument();
PdfDictionary structureTreeRoot = new PdfDictionary(document);
structureTreeRoot.Elements["/StructElem"] = new PdfName("/Bla"); //The entry must exist, no matter which term is in there (source: Adobe Preflight)
PdfArray array = new PdfArray(document);
document.Internals.AddObject(structureTreeRoot);
document.Internals.Catalog.Elements["/StructTreeRoot"] = PdfInternals.GetReference(structureTreeRoot);
PdfDocument document = new PdfDocument();
}