时间:2023-06-10 15:24:01 | 来源:网站运营
时间:2023-06-10 15:24:01 来源:网站运营
Aspose.Words for .NET使用文档教程(2):克隆文档:Aspose.Words无需Microsoft Word也可在任何平台上满足Word文档的一切操作需求。本文将与大家分享如何检测文件格式和检查格式兼容性。// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET// The path to the documents directory.string dataDir = RunExamples.GetDataDir_WorkingWithDocument();// Load the document from disk.Document doc = new Document(dataDir + "TestFile.doc");Document clone = doc.Clone();dataDir = dataDir + "TestFile_clone_out.doc";// Save the document to disk.clone.Save(dataDir);
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET// The path to the documents directory.string dataDir = RunExamples.GetDataDir_QuickStart();// Load the document from disk.Document doc = new Document(dataDir + "Template.doc");PdfSaveOptions saveOptions = new PdfSaveOptions();saveOptions.DisplayDocTitle = true;dataDir = dataDir + "Template_out.pdf";// Save the document in PDF format.doc.Save(dataDir, saveOptions);
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NETDocument doc = new Document(inputFileName);doc.Protect(ProtectionType.AllowOnlyFormFields, "password");
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NETDocument doc = new Document(inputFileName);doc.Unprotect();
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NETDocument doc = new Document(inputFileName);ProtectionType protectionType = doc.ProtectionType;
关键词:教程,使用