// Path: Android_v5/src/com/newppt/android/entity/MyPath.java
// public class MyPath {
// 	
// 	public  static String rootPath = Environment.getExternalStorageDirectory() + "/"
// 			+ "AndroidPPT/";
// 	public static String savePptFilePath = Environment.getExternalStorageDirectory() + "/"
// 			+ "AndroidPPTFile/";
// 	public static String jpgPath = rootPath + "ppt.jpg";
// 	
// 	public static String pptJpg = "/ppt";
// 	public static String noteJpg = "/note";
// 	
// 	String fileName ="ppt.jpg";
// 
// 	public MyPath() {
// 		// TODO Auto-generated constructor stub
// 	}
// 	
// 	public String returnRootPath() {
// 		return rootPath;
// 	}
// 	
// 	public String returnJpgPath() {
// 		return jpgPath;
// 	}
// 	
// 	public String returnFileName() {
// 		return fileName;
// 	}
// 
// }


import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import org.apache.batik.dom.svg.SVGDOMImplementation;
import org.apache.batik.svggen.SVGGraphics2D;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.image.JPEGTranscoder;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.model.TextRun;
import org.apache.poi.hslf.usermodel.RichTextRun;
import org.apache.poi.hslf.usermodel.SlideShow;
import org.apache.poi.xslf.usermodel.XMLSlideShow;
import org.apache.poi.xslf.usermodel.XSLFShape;
import org.apache.poi.xslf.usermodel.XSLFSlide;
import org.apache.poi.xslf.usermodel.XSLFTextParagraph;
import org.apache.poi.xslf.usermodel.XSLFTextRun;
import org.apache.poi.xslf.usermodel.XSLFTextShape;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.newppt.android.entity.MyPath;
		this.currentPage = cur;
		String prefix = getExt();
		setGraphics();
		Element svgRoot;
		if (prefix.equalsIgnoreCase("ppt")) {
			slide[currentPage - 1].draw(graphics);
			svgRoot = doc.getDocumentElement();
			graphics.getRoot(svgRoot);
//			createPPTJpg(doc);
			createPPTJpg2(currentPage - 1);
	
		} else {
			slidePPTx[currentPage - 1].draw(graphics);
			svgRoot = doc.getDocumentElement();
			graphics.getRoot(svgRoot);
			
			createPPTXJpg(currentPage - 1);
			
		}
		return doc;
	}

	/**
	 * ´´½¨pptxµ±Ç°Ò³×ª»¯Îªjpg
	 * 
	 * @param cur
	 *            µ±Ç°Ò³
	 */
	public void createPPTXJpg(int cur) {

// Path: Android_v5/src/com/newppt/android/entity/MyPath.java
// public class MyPath {
// 	
// 	public  static String rootPath = Environment.getExternalStorageDirectory() + "/"
// 			+ "AndroidPPT/";
// 	public static String savePptFilePath = Environment.getExternalStorageDirectory() + "/"
// 			+ "AndroidPPTFile/";
// 	public static String jpgPath = rootPath + "ppt.jpg";
// 	
// 	public static String pptJpg = "/ppt";
// 	public static String noteJpg = "/note";
// 	
// 	String fileName ="ppt.jpg";
// 
// 	public MyPath() {
// 		// TODO Auto-generated constructor stub
// 	}
// 	
// 	public String returnRootPath() {
// 		return rootPath;
// 	}
// 	
// 	public String returnJpgPath() {
// 		return jpgPath;
// 	}
// 	
// 	public String returnFileName() {
// 		return fileName;
// 	}
// 
// }


// Path: AndroidServer-v4/src/com/newppt/android/logical/Svg.java
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import org.apache.batik.dom.svg.SVGDOMImplementation;
import org.apache.batik.svggen.SVGGraphics2D;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.image.JPEGTranscoder;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.model.TextRun;
import org.apache.poi.hslf.usermodel.RichTextRun;
import org.apache.poi.hslf.usermodel.SlideShow;
import org.apache.poi.xslf.usermodel.XMLSlideShow;
import org.apache.poi.xslf.usermodel.XSLFShape;
import org.apache.poi.xslf.usermodel.XSLFSlide;
import org.apache.poi.xslf.usermodel.XSLFTextParagraph;
import org.apache.poi.xslf.usermodel.XSLFTextRun;
import org.apache.poi.xslf.usermodel.XSLFTextShape;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.newppt.android.entity.MyPath;

		this.currentPage = cur;
		String prefix = getExt();
		setGraphics();
		Element svgRoot;
		if (prefix.equalsIgnoreCase("ppt")) {
			slide[currentPage - 1].draw(graphics);
			svgRoot = doc.getDocumentElement();
			graphics.getRoot(svgRoot);
//			createPPTJpg(doc);
			createPPTJpg2(currentPage - 1);
	
		} else {
			slidePPTx[currentPage - 1].draw(graphics);
			svgRoot = doc.getDocumentElement();
			graphics.getRoot(svgRoot);
			
			createPPTXJpg(currentPage - 1);
			
		}
		return doc;
	}

	/**
	 * ´´½¨pptxµ±Ç°Ò³×ª»¯Îªjpg
	 * 
	 * @param cur
	 *            µ±Ç°Ò³
	 */
	public void createPPTXJpg(int cur) {

		MyPath mypath = new MyPath();