PPTX to PDF conversion page format issue

Discuss the presentation application

PPTX to PDF conversion page format issue

Postby poojard » Fri Mar 31, 2017 11:52 am


I am using open office to convert pptx to pdf using export to pdf functionality.Below is the code -

Code: Select all   Expand viewCollapse view
XComponentLoader xComponentLoader = OpenOfficeConnector.getOpenOfficeLoader();

PropertyValue[] loadProps = new PropertyValue[1];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "Hidden";
loadProps[0].Value = Boolean.TRUE;

PropertyValue[] storeProps = new PropertyValue[1];
storeProps[0] = new PropertyValue();
storeProps[0].Name = "FilterName";
storeProps[0].Value = "impress_pdf_Export";

source = "file:///".concat(source);
XComponent document = xComponentLoader.loadComponentFromURL(source, "_default", 0, loadProps);
XStorable xStorable = UnoRuntime.queryInterface(XStorable.class, document);
xStorable.storeToURL(destination, storeProps);
XCloseable xcloseable = UnoRuntime.queryInterface(XCloseable.class, document);

When I open when I open sample pptx it's loading page with some cropped text. When I export it to pdf text also looks cropped in output pdf.
When I go to Format->Page-> and change it to A3 it shows the correct text and then in export pdf it looks fine.

I want to either change page size on document load using java code or please suggest any other alternative if there.
This is very urgent issue please help me solve this.

Attaching sample file pptx.
(101.36 KiB) Downloaded 140 times
OpenOffice 2.4 on Ubuntu 9.04
Posts: 2
Joined: Thu Mar 30, 2017 2:00 pm

Re: PPTX to PDF conversion page format issue

Postby Mr.Dandy » Thu Apr 20, 2017 3:10 pm

Install MS-Powerpoint free viewer and a PDF virtual printer like PDF Creator or DoPDF.
OpenOffice 4.1.7 - Windows 10
User avatar
Posts: 332
Joined: Tue Dec 11, 2012 4:22 pm

Return to Impress

Who is online

Users browsing this forum: No registered users and 9 guests