---
title: "สวัสดีชาวโลก!"
---

"สวัสดีชาวโลก!" โค้ดมักเป็นตัวอย่างง่ายๆ ตัวแรกในการเขียน uisng "Aspose.Words for Python via .NET" และยังสามารถใช้เป็นการทดสอบสติเพื่อให้แน่ใจว่าซอฟต์แวร์ที่ตั้งใจจะคอมไพล์หรือรันซอร์สโค้ดได้รับการติดตั้งอย่างถูกต้อง

ไลบรารี "Aspose.Words สำหรับ Python via .NET" ช่วยให้นักพัฒนาสามารถเข้าถึงโดยตรงเพื่อสร้าง แก้ไข ผสาน แปลง เปรียบเทียบเอกสาร Word และเว็บ PDF, DOCX, DOC, RTF, ODT, EPUB, HTML และรูปแบบไฟล์อื่นๆ มากมายคือ [รูปแบบเอกสารที่รองรับ](/words/th/python-net/supported-document-formats/)

ข้อมูลโค้ด Below code ทำตามขั้นตอนเหล่านี้:

1. สร้าง [Document](https://reference.aspose.com/words/python-net/aspose.words/document/) ว่างใหม่
1. เริ่มต้นคลาส [DocumentBuilder](https://reference.aspose.com/words/python-net/aspose.words/documentbuilder/)
1. แทรกข้อความลงในเอกสารโดยเริ่มโดยใช้วิธี [write](https://reference.aspose.com/words/python-net/aspose.words/documentbuilder/write/) แบบง่าย
1. เปิด [Document](https://reference.aspose.com/words/python-net/aspose.words/document/) ที่มีอยู่จากไฟล์ ตรวจจับรูปแบบไฟล์โดยอัตโนมัติ
1. เอกสาร [Append](https://reference.aspose.com/words/python-net/aspose.words/document/append_document/) "A" ถึงและของเอกสาร "B"
1. [Save](https://reference.aspose.com/words/python-net/aspose.words/document/save/) เอาต์พุตเป็น PDF

ข้อมูลโค้ดต่อไปนี้คือ "Hello, World!" ตัวอย่างเพื่อแสดงการทำงานของ API "Aspose.Words for Python via .NET":

{{< gist "aspose-words-gists" "ff869587c650d2a27785d5cd598ae0b4" "hello-world.py" >}}
