import com.aspose.words.SaveFormat;
import com.aspose.words.SaveFormat;
File file = new File(PDF路径);
FileOutputStream fileOutputStream = new FileOutputStream(file);
Document docs = new Document(WORD路径);
docs.save(fileOutputStream, SaveFormat.PDF);
fileOutputStream.close();