คอนเวอร์เตอร์เอกสารสำหรับ .NET
บทนําใน DOC Converter สําหรับ .NET
DOC Converter for .NET เป็นปลั๊กอินที่ช่วยให้ผู้พัฒนาสามารถแปลงเอกสาร PDF ไปยังรูปแบบไฟล์ Word คู่มือนี้ให้รายละเอียดเกี่ยวกับคุณสมบัติที่มีอยู่และอธิบายวิธีการดําเนินการงานทั่วไปโดยใช้ตัวอย่างรหัสใน .Net
การแปลงเอกสาร
DOC Converter สําหรับ .NET สนับสนุนการแปลงเอกสาร PDF ไปยังรูปแบบไฟล์ที่นิยมเช่นเอกลักษณ์ Word ตัวอย่างรหัสต่อไปนี้แสดงให้เห็นวิธีการแปลงไฟล์ .pdf ไปเป็นไฟล์.docx:
var inputPath = Path.Combine(@"C:\Samples\", "sample.pdf");
var outputPath = Path.Combine(@"C:\Samples\", "sample.docx");
// Create an instance of the PdfDoc plugin.
var plugin = new PdfDoc();
// Create an instance of the PdfToDocOptions class.
var options = new PdfToDocOptions
{
SaveFormat = SaveFormat.DocX
};
// Add the input and output file paths to the options.
options.AddInput(new FileDataSource(inputPath));
options.AddOutput(new FileDataSource(outputPath));
// Process the PDF to Word conversion using the plugin and options.
var resultContainer = plugin.Process(options);
// Get the result from the result container.
var result = resultContainer.ResultCollection[0];
// Print the result.
Console.WriteLine(result);
รูปแบบไฟล์ที่รองรับ
DOC Converter สําหรับ .NET สนับสนุนรูปแบบไฟล์ input และ output ต่อไปนี้:
- บทนํา: PDF
- การผลิต: DOC, DOCX
การปฏิบัติที่ดีที่สุดและการแก้ปัญหา
เมื่อใช้ DOC Converter สําหรับ .NET มันเป็นสิ่งที่ดีที่จะปฏิบัติตามการปฏิบัติที่ดีที่สุดเพื่อให้แน่ใจว่าประสิทธิภาพที่ดีที่สุดและหลีกเลี่ยงปัญหาทั่วไป บางเคล็ดลับรวมถึง:
- ใช้เส้นทางไฟล์และชื่อที่ถูกต้อง
- รายละเอียดรูปแบบไฟล์ input และ output ที่ถูกต้อง
- ตัวเลือกการแปลงที่กําหนดเองตามความต้องการ