Install
No framework information available.
README
Description
Aspose.PDF for C++ is a native C++ library that enables the developers to add PDF handling capabilities to their C++ applications.
Aspose.PDF for C++ API can be used to build C++ applications which are capable of reading, writing, rendering, printing, and converting PDF documents (PDF, PDF/A). You can also work with attachments, images, security, signatures, text, and tables.
Aspose.PDF for C++ allows you to extract text from all pages of a PDF document, set privileges on a PDF file, work with bookmarks and annotations. It also gives you vast control over customizing the PDF display properties, fonts, zoom fact, and content formatting. Text search feature is also available. You can convert PDF documents to the DOC, DOCX, and SVG formats by simply calling the designated C++ methods.
Aspose.PDF for C++ performs equally well at the client-end and server-side. It can be used in the development environment that supports C++ but explicitly supports MS Visual Studio 2015 or later. Aspose.PDF for C++ can be installed manually by downloading its ZIP package or it (Aspose.PDF.CPP) can be added via NuGet Package Manager. Support for Qt framework is also available.
Usage
The types from this package can be used in the client's code. Please make sure to use proper smart pointer wrappers for class-like types. For more information, please refer to the product documentation.
#include "Aspose.PDF.Cpp/Document.h"
#include "Aspose.PDF.Cpp/Page.h"
#include "Aspose.PDF.Cpp/PageCollection.h"
#include "Aspose.PDF.Cpp/Generator/Paragraphs.h"
#include "Aspose.PDF.Cpp/Text/TextFragment.h"
#include "Aspose.PDF.Cpp/SaveFormat.h"
using namespace System;
using namespace Aspose::Pdf;
void pdf2docx(String inputFilename, String outputFilename)
{
auto document = MakeObject(inputFilename);
document->Save(outputFilename, SaveFormat::DocX);
}
bool create_pdf(String filename)
{
try
{
auto document = MakeObject();
auto page = document->get_Pages()->Add();
auto paragraps = page->get_Paragraphs();
paragraps->Add(MakeObject<Aspose::Pdf::Text::TextFragment>(u"Hello World!"));
paragraps->Add(MakeObject<Aspose::Pdf::Text::TextFragment>(u"This example is created by Aspose.Pdf for C++."));
page = document->get_Pages()->Add();
paragraps = page->get_Paragraphs();
paragraps->Add(MakeObject<Aspose::Pdf::Text::TextFragment>(u"Second page."));
paragraps->Add(MakeObject<Aspose::Pdf::Text::TextFragment>(u"This example is created by Aspose.Pdf for C++."));
document->Save(filename);
}
catch (const Exception& ex)
{
std::cout << ex->get_Message() << std::endl;
return false;
}
return true;
}
int main()
{
if (create_pdf(u"hello.pdf"))
pdf2docx(u"hello.pdf", u"hello.docx");
}
Resources
- Product Home: https://products.aspose.com/pdf/cpp/
- Download: https://releases.aspose.com/pdf/cpp/
- Documentation: https://docs.aspose.com/pdf/cpp/
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.