pptx to pdf not converting properly

Hi

I am using libreoffice to convert pptx to pdf. it is not converting properly especially the images and fonts are not getting retained in the pdf. the image color has changed to black. please advise

I am using the below code
XComponent objectDocumentToStore =newDocComponent(inputFile);
XStorable xstorable =( XStorable ) UnoRuntime.queryInterface( XStorable.class,objectDocumentToStore );
PropertyValue[] props = new PropertyValue[1];
props[0] = new PropertyValue();
props[0].Name = “FilterName”;
props[0].Value = “impress8”;
// Specifies if graphics are exported to PDF using a
// lossless compression. If this property is set to true,
// it overwrites the “Quality” property
props[1] = new PropertyValue();
props[1].Name = “UseLosslessCompression”;
props[1].Value = new Boolean(true);

    props[2] = new PropertyValue();
    props[2].Name = "selectPdfVersion";
    props[2].Value =new Integer(1);

I am using LibreOffice_5.2.3_Linux_x86-64_rpm.tar.gz on RHEL

How do i fix this

Thanks

Why don’t you try using something like “soffice --convert-to pdf filename.ext --headless” with a script in lieu of a program? I believe that you can use Cygwin for Windows as well.