Outlining fonts should never be done, embedding fonts is the correct solution.
If it has to be done, use Adobe Acrobat Pro, never InDesign as it causes a lot of problems.
Go to Acrobat Pro DC > Print Production > Preflight > PDF Fixups > Convert Fonts to Outlines > Analyze and fix
JPG has never text outlines, is is raster image pure, only clipping paths are possible.
If the font is not possible to embed, open it in Acrobat Pro on a computer where this font is installed and make the fix up as described above.
I Want to make a 'outlined font PDF file' with online solution like API, SDK and so on..
So I want to know about InDesign Server.
Because of printing issue, I need to Outline fonts.
If your printer has an issue with PDF without outlined font, choose a different one.
Neither in InDesign nor in InDesign Server Fonts should be converted to outlines as it causes huge problems. There was once a workaround with flattening transparency, but this is not possible with current versions nor it is to recommend as transparency had to be flattened.
You can do it in Adobe Acrobat Pro without problems and you can automatise it with Actions and scripting in Acrobat. But don't do it with InDesign (Server)!!!!!
In the company I work for, we use InDesign Server to produce PDFs for print and we do not outline fonts. Why do you want to do this?
according to produce team, there is rip error from printing device.
and anyway company wants to know that there is a solution in Indesign server.
that is, after upload PDF(ai,psd,jpg) files to some server, if It can be produced outline fonts.
InDesign server (neither inDesign desktop) can't outline fonts in a PDF. It could do outline the fonts in an indd file, with a script (but I don't know how to write this script), and as it has be answered, it's a very bad idea. If you really want to outline fonts in a PDF file, maybe you should have a look to PitStop, PitStop Server or follow Willi advices.
Dov Isaacs, Principal Scientist for Adobe, posted in the last conversation about outlining fonts said that the best way to outline fonts (if you have to, generally a bad idea!) is to run a preflight profile available in Acrobat DC, the latest version.