how to export reporting SVG or PNG when run batch file?

Continuing the discussion from Error Reporting SVG Retieval failed:JavaScirpt returned nothing:

Just like this topic, when exporting graphs, there are always errors, or the background turns black. Is there any way to fix it? I have looked into other solutions but none of them seem to work.

Thank you very much.