Tommaso Cucinotta wrote: > As in the prior patch, an alternative to this problem at all is the one to > simply remove the "--fg" and "--bg" options to the command-line invoking > the external command. > > Someone who knows this part of the code should advise on the best > solution.
I used to know it a long time ago. I have a vague memory that the fg and bg settings are only needed to convert preview snippets for on-screen display. If that is true, then they are not needed at all for command line export, but I wonder why preview snippets are generated at all in that case? If my memory is right, then you can simply skip the whole preview generation in command line mode, and the code in question can always use theApp(), because it will never be NULL when it is called. In any case, please double check that the image conversion results for exporting the document to a particular format are identical regardless whether the export is triggered from the menu or by command line. Document export is IMHO the most important application of the LyX command line interface, e.g. in some automated processes. Georg