Визуализация может быть выполнена путем визуализации каждого слайда в виде изображения JPG.
Вы можете использовать Java-библиотеку Jacob для конвертации. Эта библиотека открывает мост COM и заставляет Microsoft Office Power Point выполнять преобразование (с помощью команды save-as). У меня PP2007:
package jacobSample;
import com.jacob.activeX.*;
import com.jacob.com.*;
public class Ppt {
ActiveXComponent pptapp = null; //PowerPoint.Application ActiveXControl Object
Object ppto = null; //PowerPoint.Application COM Automation Object
Object ppts = null; //Presentations Set
// Office.MsoTriState
public static final int msoTrue = -1;
public static final int msoFalse = 0;
// PpSaveAsFileType
public static final int ppSaveAsJPG = 17 ;
//other formats..
public static final int ppSaveAsHTML = 12;
public static final int ppSaveAsHTMLv3 =13;
public static final int ppSaveAsHTMLDual= 14;
public static final int ppSaveAsMetaFile =15;
public static final int ppSaveAsGIF =16;
public static final int ppSaveAsPNG =18;
public static final int ppSaveAsBMP =19;
public static final int ppSaveAsWebArchive =20;
public static final int ppSaveAsTIF= 21;
public static final int ppSaveAsPresForReview= 22;
public static final int ppSaveAsEMF= 23;
public Ppt(){
try{
pptapp = new ActiveXComponent("PowerPoint.Application");
ppto = pptapp.getObject();
ppts = Dispatch.get((Dispatch)ppto, "Presentations").toDispatch();
}catch(Exception e){
e.printStackTrace();
}
}
public Dispatch getPresentation(String fileName){
Dispatch pres = null; //Presentation Object
try{
pres = Dispatch.call((Dispatch)ppts, "Open", fileName,
new Variant(Ppt.msoTrue), new Variant(Ppt.msoTrue),
new Variant(Ppt.msoFalse)).toDispatch();
}catch(Exception e){
e.printStackTrace();
}
return pres;
}
public void saveAs(Dispatch presentation, String saveTo, int ppSaveAsFileType){
try{
Object slides = Dispatch.get(presentation, "Slides").toDispatch();
Dispatch.call(presentation, "SaveAs", saveTo, new Variant(ppSaveAsFileType));
}catch (Exception e) {
e.printStackTrace();
}
}
public void closePresentation(Dispatch presentation){
if(presentation != null){
Dispatch.call(presentation, "Close");
}
}
public void quit(){
if(pptapp != null){
ComThread.Release();
//pptapp.release();
try{
pptapp.invoke("Quit", new Variant[]{});
}catch(Exception e){
System.out.println("error");
}
}
}
public static void main(String[] args){
//System.loadLibrary("jacob-1.15-M4-x86.dll");
//System.loadLibrary("jacob-1.15-M4-x64.dll");
Ppt a = new Ppt();
System.out.println("start");
Dispatch pres = a.getPresentation("C:\\j.pptx");// pptx file path
a.saveAs(pres, "C:\\im", Ppt.ppSaveAsJPG); // jpg destination folder
a.closePresentation(pres);
a.quit();
System.out.println("end");
}
}