Docx to PDF is not able to convert chart, shapes

Hi Experts,

I am trying to convert docx to PDF. Everything works fine if docx doesn’t have chart.
If i insert chart or shapes then those chart and shape is not coming in PDF.

I am adding the chart in docx via Insert > Object > Chart… and then using these commands to convert to PDF:

    File inputFile = new File("D:\\Arvind\\FilesToConnvert\\Doc_1.docx");
	File outputFile = new File("D:/Arvind/FilesToConnvert/Doc1.pdf");
	 
	// connect to an OpenOffice.org instance running on port 8100
	OpenOfficeConnection connection = new SocketOpenOfficeConnection(8100);
	connection.connect();
		 
	// convert
	DocumentConverter converter = new OpenOfficeDocumentConverter(connection);
	converter.convert(inputFile, outputFile);
		 
	// close the connection
	connection.disconnect();

Have you tried opening the file and verify export to pdf works fine?. I think the last selected options are used in convert.

Menu/Tools/Options/LibreOffice writer/Print