Create PDF Booklet in C++
Contents
[
Hide
]
Use PdfFileEditor for this task. The examples below retain the original C++ code and API Reference steps.
Create PDF booklet
Create booklet output with the default MakeBooklet overload.
- Create PdfFileEditor.
- Generate booklet output with PdfFileEditor::MakeBooklet().
#include <Aspose.PDF.Cpp/Facades/PdfFileEditor.h>
#include <system/string.h>
namespace Facades::Examples::PDF_FileEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
void CreatePdfBooklet(String inputFile, String outputFile)
{
auto bookletMaker = MakeObject<PdfFileEditor>();
bookletMaker->MakeBooklet(inputFile, outputFile);
}
} // namespace Facades::Examples::PDF_FileEditor
Try create PDF booklet
Create a booklet and print a failure message if MakeBooklet returns false.
- Create PdfFileEditor.
- Generate booklet output with PdfFileEditor::MakeBooklet().
- Print the results or diagnostic messages shown in the example.
#include <Aspose.PDF.Cpp/Facades/PdfFileEditor.h>
#include <iostream>
#include <system/string.h>
namespace Facades::Examples::PDF_FileEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
void TryCreatePdfBooklet(String inputFile, String outputFile)
{
auto bookletMaker = MakeObject<PdfFileEditor>();
if (!bookletMaker->MakeBooklet(inputFile, outputFile))
{
std::cout << "Failed to create booklet." << std::endl;
}
}
} // namespace Facades::Examples::PDF_FileEditor