All answers above suggested to use some converter from tex/pdf file to the wanted file format, that is why I try to give an n-th proposal. I think this approach is quite insane in this situation, as native solutions also exist - as the OP also mentioned.