Export a Master Document to PDF in Headless Mode

This question was asked before (Export to PDF in headless mode?) but the topic was closed without there being any resolution, so I’m asking the question again:

Is there a way to export/convert a odm master document to a pdf file (or odt file) in headless mode so it will import external data (odt files) not only the links to them. I know you can do this in the program under File/Export as pdf but when you do it in headless mode with convert-to you keep the links and when you try to look at the pdf it will miss all text from the external odts. If you can’t do this, can you do it some other way without having to do in manually in the GUI?