使用应用程序在线将 PCL 文件转换为 RTF 文件
- 上传 PCL 文件进行转换
- 等待几秒钟或更长时间,具体取决于 PCL 大小
- 留意上传状态栏
- 点击“转换”按钮
- PCL 将转换为 RTF 文档
- 下载转换后的RTF文件
通过 Java 自动化 API 将 PCL 转换为 RTF
Document document = new Document("template.pcl"); | |
document.save("DocOutput.doc", SaveFormat.DOC); | |
Document outputDocument = new com.aspose.words.Document("DocOutput.doc"); | |
// call save method while passing SaveFormat.DOCM | |
outputDocument.save("output.docm", SaveFormat.DOCM); |
使用其他功能(如 通过 Java 打开受密码保护的 PCL 文档, 通过 Java 将 RTF 文档保存到数据库)将 PCL 保存为 RTF 的情况较少。
// open encrypted document
Document document = new Document("input.pcl", "password");
// save PCL as a DOC
document.save("DocOutput.doc", SaveFormat.DOC);
public static void StoreToDatabase(Document doc, Connection mConnection) throws Exception {
// create an output stream which uses byte array to save data
ByteArrayOutputStream aout = new ByteArrayOutputStream();
// save the document to byte array
doc.save(aout, SaveFormat.RTF);
// get the byte array from output steam
// the byte array now contains the document
byte[] buffer = aout.toByteArray();
// get the filename from the document.
String fileName = doc.getOriginalFileName();
String filePath = fileName.replace("\\", "\\\\");
// create the SQL command.
String commandString = "INSERT INTO Documents (FileName, FileContent) VALUES('" + filePath + "', '" + buffer + "')";
Statement statement = mConnection.createStatement();
statement.executeUpdate(commandString);
}
使用 Java 开发 PCL 文件转换应用程序
需要开发基于 Java 的软件应用程序来轻松保存和导出 PCL 文件到 RTF 文档吗? 通过
Aspose.Total for Java
,任何Java开发人员都可以集成上述API代码来编写跨多种格式的转换应用程序,包括Microsoft Word(DOC、DOCX)、Excel(XLS、XLSX)、Powerpoint(PPT、PPTX)、PDF、电子邮件文件、图像(JPG、PNG、BMP、GIF)和其他格式。 强大的 Java 文档转换库,支持许多流行格式,包括 PCL 格式。 将文档导出和渲染为其他格式,程序员可以使用 Aspose.Total for Java 子 API,包括
Aspose.Words for Java
、
Aspose.Cells for Java
、
Aspose.Slides for Java
、
Aspose.PDF for Java
、
Aspose.Imaging for Java
等。
PCL Java 转换库
还有其他选项可以将 Aspose.Total for Java 集成到您的系统中。 请选择一个符合您需求的方案并按照分步说明进行操作:
- 直接从基于 Maven 的项目中使用 Aspose.Total for Java,并在 pom.xml 中包含相关子 API。
- 或者,可以从 下载 获取一个 ZIP 文件。
正在将 PCL 保存至 RTF 应用要求
任何可以运行 Java 运行时环境 (JRE) 的操作系统都可以运行 Aspose.Total for Java。 以下列出了大多数(但不是全部)受支持的操作系统。
- 微软 Windows
- Linux:Ubuntu、OpenSUSE、CentOS 等
- macOS :10.9 (Mavericks) 及更高版本
- 移动设备:Android、iOS