เพิ่มลายน้ำข้อความไปยัง PPTX ผ่าน C++
สร้างแอป C++ ของคุณเองเพื่อใส่ลายน้ำไฟล์ PPTX โดยใช้ API ฝั่งเซิร์ฟเวอร์
วิธีใส่ลายน้ำไฟล์ PPTX โดยใช้ C ++
เพื่อใส่ลายน้ำไฟล์ PPTX เราจะใช้
API ซึ่งเป็น API ลายน้ำเอกสารที่มีคุณสมบัติหลากหลาย ทรงพลัง และใช้งานง่ายสำหรับแพลตฟอร์ม C++ คุณสามารถดาวน์โหลดเวอร์ชันล่าสุดได้โดยตรง เพียงแค่เปิด
package manager ค้นหา Aspose.Slides.Cpp และติดตั้ง คุณยังสามารถใช้คำสั่งต่อไปนี้จาก Package Manager Console
สั่งการ
PM> Install-Package Aspose.Slides.Cpp
ขั้นตอนในการเพิ่มลายน้ำให้กับ PPTX ผ่าน C++
คุณต้องใช้ aspose.slides.dll เพื่อลองใช้เวิร์กโฟลว์ต่อไปนี้ในสภาพแวดล้อมของคุณเอง
โหลดไฟล์ PPTX ด้วยอินสแตนซ์ของคลาสการนำเสนอ
รับสไลด์แรก
เพิ่มรูปร่างอัตโนมัติของประเภทสี่เหลี่ยมผืนผ้า
เพิ่ม TextFrame ให้กับสี่เหลี่ยมผืนผ้า
สร้างวัตถุย่อหน้าสำหรับกรอบข้อความ
สร้างวัตถุส่วนสำหรับย่อหน้า
เพิ่มลายน้ำโดยใช้ set_Text()
บันทึกเอกสาร
ความต้องการของระบบ
Aspose.Slides สำหรับ C ++ รองรับบนแพลตฟอร์มหลักและระบบปฏิบัติการทั้งหมด โปรดตรวจสอบให้แน่ใจว่าคุณมีข้อกำหนดเบื้องต้นดังต่อไปนี้
เพิ่มลายน้ำให้กับ PPTX - C++
// Load the desired PPTX File
SharedPtr<Presentation> pres = MakeObject<Presentation>(u"templatePath.pptx");
// Access first slide
SharedPtr<ISlide> slide = pres->get_Slides()->idx_get(0);
// Add an AutoShape of Rectangle type
SharedPtr<IAutoShape> ashp = slide->get_Shapes()->AddAutoShape(ShapeType::Rectangle, 150, 75, 150, 50);
ashp->get_FillFormat()->set_FillType(FillType::NoFill);
// Add TextFrame to the Rectangle
ashp->AddTextFrame(u" ");
// Accessing the text frame
SharedPtr<ITextFrame> txtFrame = ashp->get_TextFrame();
// Create the Paragraph object for text frame
SharedPtr<IParagraph> paragraph = txtFrame->get_Paragraphs()->idx_get(0);
// Create Portion object for paragraph
SharedPtr<IPortion> portion = paragraph->get_Portions()->idx_get(0);
portion->set_Text(u"Watermark Text Watermark Text Watermark Text");
//Adding another shape
SharedPtr<IAutoShape> ashape2 = slide->get_Shapes()->AddAutoShape(ShapeType::Triangle, 200, 365, 400, 150);
//Reorder shape
slide->get_Shapes()->Reorder(2, ashape2);
// Save PPTX to Disk
pres->Save(u"outPath.pptx", Aspose::Slides::Export::SaveFormat::Pptx);
เกี่ยวกับ Aspose.Slides สำหรับ C++ API
Aspose.Slides API สามารถใช้อ่าน เขียน จัดการ และแปลงเอกสาร Microsoft PowerPoint เป็น PDF, XPS, HTML, TIFF, ODP และรูปแบบอื่นๆ ได้ หนึ่งสามารถสร้างไฟล์ใหม่ตั้งแต่เริ่มต้นและบันทึกในรูปแบบที่รองรับที่เกี่ยวข้อง Aspose.Slides เป็น API แบบสแตนด์อโลนสำหรับการสร้าง แยกวิเคราะห์ หรือจัดการการนำเสนอ สไลด์ และองค์ประกอบ และไม่ขึ้นกับซอฟต์แวร์ใดๆ เช่น Microsoft หรือ OpenOfficeWatermark PPTX via Online App
Add watermark to PPTX documents by visiting our Live Demos website . The live demo has the following benefits
PPTX PPTX รูปแบบไฟล์คืออะไร
Files with PPTX extension are presentation files created with popular Microsoft PowerPoint application. Unlike the previous version of presentation file format PPT which was binary, the PPTX format is based on the Microsoft PowerPoint open XML presentation file format. A presentation file is a collection of slides where each slide can comprise of text, images, formatting, animations, and other media. These slides are presented to audience in the form of slideshows with custom presentation settings.
อ่านเพิ่มเติมรูปแบบลายน้ำอื่น ๆ ที่รองรับ
การใช้ C ++ สามารถใส่ลายน้ำรูปแบบต่าง ๆ ได้อย่างง่ายดายรวมถึง