Ask Your Question

pptx to pdf not converting properly

asked 2016-11-09 11:44:01 +0100

prashanth_bhat gravatar image

updated 2020-12-02 11:18:06 +0100

Alex Kemp gravatar image


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


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-03-27 21:55:29 +0100

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-11-09 11:44:01 +0100

Seen: 173 times

Last updated: Mar 27 '18