i have a question ,i want to convert any type to pdf . bug it too big for me .
so i want get pdf 10 page ..hao can i set it ?
i use java
this is my convert code ..thanks !!!
Code: Select all
// Preparing properties for converting the document
PropertyValue[] propertyValues = new PropertyValue[2];
// Setting the flag for overwriting
propertyValues[0] = new PropertyValue();
propertyValues[0].Name = "Overwrite";
propertyValues[0].Value = new Boolean(true);
// Setting the filter name
propertyValues[1] = new PropertyValue();
propertyValues[1].Name = "FilterName";
propertyValues[1].Value = convertType;
// Composing the URL by replacing all backslashs
File outputFile = new File(outputFilePath);
String outputUrl = "file:///"
+ outputFile.getAbsolutePath().replace('\\', '/');
// Getting an object that will offer a simple way to store
// a document to a URL.
XStorable storable = UnoRuntime.queryInterface(XStorable.class, doc);
// Storing and converting the document
storable.storeToURL(outputUrl, propertyValues);