เพิ่มลายน้ำข้อความไปยัง PPT ผ่าน C#
สร้างแอป .NET ของคุณเองเพื่อใส่ลายน้ำไฟล์ PPT โดยใช้ API ฝั่งเซิร์ฟเวอร์
วิธีใส่ลายน้ำไฟล์ PPT โดยใช้ C#
เพื่อใส่ลายน้ำไฟล์ PPT เราจะใช้
API ซึ่งเป็น API การจัดการเอกสารที่มีคุณลักษณะหลากหลาย มีประสิทธิภาพ และใช้งานง่ายสำหรับแพลตฟอร์ม C# เปิด
package manager ค้นหา สมมติ.สไลด์ และติดตั้ง คุณยังสามารถใช้คำสั่งต่อไปนี้จาก Package Manager Console
สั่งการ
PM> Install-Package Aspose.Slides.NET
ขั้นตอนในการเพิ่มลายน้ำให้กับ PPT ผ่าน C#
คุณต้องใช้ aspose.slides.dll เพื่อลองใช้เวิร์กโฟลว์ต่อไปนี้ในสภาพแวดล้อมของคุณเอง
สร้างอินสแตนซ์ของคลาสการนำเสนอ
เลือกการนำเสนอต้นแบบ
เพิ่มประเภทรูปร่างโดยใช้ AddAutoShape
เพิ่มข้อความลายน้ำโดยใช้ AddTextFrame
ความต้องการของระบบ
Aspose.Slides สำหรับ .NET รองรับระบบปฏิบัติการหลักทั้งหมด เพียงตรวจสอบให้แน่ใจว่าคุณมีข้อกำหนดเบื้องต้นดังต่อไปนี้
- Microsoft Windows หรือระบบปฏิบัติการที่เข้ากันได้กับ .NET Framework, .NET Core, Windows Azure, Mono หรือ Xamarin Platforms
- สภาพแวดล้อมการพัฒนาเช่น Microsoft Visual Studio
- Aspose.Slides สำหรับ .NET ที่อ้างอิงในโครงการของคุณ
เพิ่มลายน้ำให้กับ PPT - C#
// create a Presentation from scratch
using (var presentation = new Aspose.Slides.Presentation())
{
// get the Master Slide to add watermark on all slides
var master = presentation.Masters[0];
// add a new shape using IShapeColection.AddAutoShape
var shape = master.Shapes.AddAutoShape(Aspose.Slides.ShapeType.Triangle, 0, 0, 0, 0);
// set watermark text
shape.AddTextFrame("CONFIDENTIAL");
// save presentation in PPT format
presentation.Save("output.ppt", Aspose.Slides.Export.SaveFormat.Ppt);
}
เกี่ยวกับ Aspose.Slides สำหรับ .NET API
Aspose.Slides API สามารถใช้อ่าน เขียน จัดการ และแปลงเอกสาร Microsoft PowerPoint เป็น PDF, XPS, HTML, TIFF, ODP และรูปแบบอื่นๆ ได้ หนึ่งสามารถสร้างไฟล์ใหม่ตั้งแต่เริ่มต้นและบันทึกในรูปแบบที่รองรับที่เกี่ยวข้อง Aspose.Slides เป็น API แบบสแตนด์อโลนสำหรับการสร้าง แยกวิเคราะห์ หรือจัดการการนำเสนอ สไลด์ และองค์ประกอบ และไม่ขึ้นกับซอฟต์แวร์ใดๆ เช่น Microsoft หรือ OpenOfficeWatermark PPT via Online App
Add watermark to PPT documents by visiting our Live Demos website . The live demo has the following benefits
PPT PPT รูปแบบไฟล์คืออะไร
A file with PPT extension represents PowerPoint file that consists of a collection of slides for displaying as SlideShow. It specifies the Binary File Format used by Microsoft PowerPoint 97-2003. A PPT file can contain several different types of information such as text, bulleted points, images, multimedia and other embedded OLE objects. Microsoft came up with newer file format for PowerPoint, known as PPTX, from 2007 onwards that is based on Office OpenXML and is different from this binary file format. Several other application programs such as OpenOffice Impress and Apple Keynote can also create PPT files.
อ่านเพิ่มเติมรูปแบบลายน้ำอื่น ๆ ที่รองรับ
การใช้ C# สามารถใส่ลายน้ำรูปแบบต่างๆ ได้อย่างง่ายดายรวมถึง