Making namespaces pdf generation working again

The debugging was quite painful...