Edit PDF in C++
High-speed and cross-platform C++ library for editing PDF using C++ code
Edit PDF using Aspose.Slides
Aspose.Slides for C++ is a powerful C++ library used to manipulate and edit presentations, PDF documents, and other files. You can edit an PDF doc by adding a new line of text to it.
Edit PDF in C++
Using Aspose.Slides for C++ , you can add a new line of text to an PDF document with just a few lines of code.
C++ code for editing PDF
auto pres = System::MakeObject<Presentation>();
pres->get_Slides()->RemoveAt(0);
pres->get_Slides()->AddFromPdf(u"document.pdf");
auto slide = pres->get_Slides()->idx_get(0);
auto shape = slide->get_Shapes()->AddAutoShape(ShapeType::Rectangle, 10.0f, 10.0f, 100.0f, 50.0f);
shape->get_TextFrame()->set_Text(u"New text");
pres->Save(u"document.pdf", SaveFormat::Pdf);
How to edit PDF in C++
Install Aspose.Slides for C++. See Installation .
Add the library as a reference in your project.
Create an instance of the Presentation class.
Load the PDF document you want to edit.
Add a new line of text.
Save the changed PDF file.