PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
convert.h File Reference

Conversion API. More...

#include <filesystem>
#include <pdfsdk/cxx/core.h>
#include <pdfsdk/convert/pdf2docx.h>
#include <pdfsdk/convert/pdf2html.h>
#include <pdfsdk/convert/pdf2pptx.h>
#include <pdfsdk/convert/pdf2xlsx.h>
#include <pdfsdk/convert/pdf2rtf.h>
#include <pdfsdk/convert/pdf2text.h>

Go to the source code of this file.

Enumerations

enum class  PDF::ConvertPdfToExcelType { TablePerSheet , PagePerSheet , DocumentPerSheet }
 The type of conversion to perform when converting a PDF document to Excel format. More...
 

Functions

void PDF::ConvertPdfToWord (const PDF::Document &input, const PDPageRange *pages, const std::filesystem::path &outputFile, PDF::ProgressMonitor *progress=nullptr)
 Converts a PDF document to Word format.
 
void PDF::ConvertPdfToExcel (const PDF::Document &input, const PDPageRange *pages, ConvertPdfToExcelType convertType, bool keepTablesOnly, const std::filesystem::path &outputFile, PDF::ProgressMonitor *progress=nullptr)
 Converts a PDF document to Excel format.
 
void PDF::ConvertPdfToPowerPoint (const PDF::Document &input, const PDPageRange *pages, const std::filesystem::path &outputFile, PDF::ProgressMonitor *progress=nullptr)
 Converts a PDF document to PowerPoint format.
 
void PDF::ConvertPdfToHtml (const PDF::Document &input, const PDPageRange *pages, const std::filesystem::path &outputFolder, PDF::ProgressMonitor *progress=nullptr)
 Converts a PDF document to HTML format.
 
void PDF::ConvertPdfToRtf (const PDF::Document &input, const PDPageRange *pages, const std::filesystem::path &outputFile, PDF::ProgressMonitor *progress=nullptr)
 Converts a PDF document to RTF format.
 
void PDF::ConvertPdfToText (const PDF::Document &input, const PDPageRange *pages, const std::wstring &pageDivider, bool convertCroppedText, const std::filesystem::path &outputFile, PDF::ProgressMonitor *progress=nullptr)
 Converts a PDF document to plain text format.
 

Detailed Description

Conversion API.

Enumeration Type Documentation

◆ ConvertPdfToExcelType

enum class PDF::ConvertPdfToExcelType
strong

The type of conversion to perform when converting a PDF document to Excel format.

Enumerator
TablePerSheet 

Each table is converted to a separate sheet.

PagePerSheet 

Each page is converted to a separate sheet.

DocumentPerSheet 

The entire document is converted to a single sheet.

Function Documentation

◆ ConvertPdfToExcel()

void PDF::ConvertPdfToExcel ( const PDF::Document & input,
const PDPageRange * pages,
ConvertPdfToExcelType convertType,
bool keepTablesOnly,
const std::filesystem::path & outputFile,
PDF::ProgressMonitor * progress = nullptr )
inline

Converts a PDF document to Excel format.

Parameters
inputThe input PDF document.
pagesThe range of pages to convert. Pass nullptr to convert all pages.
convertTypeThe type of conversion to perform (TablePerSheet, PagePerSheet, DocumentPerSheet).
keepTablesOnlyWhether to keep only the tables in the converted document.
outputFileThe path of the output Excel file.
progressAn optional progress monitor for tracking the conversion progress.

◆ ConvertPdfToHtml()

void PDF::ConvertPdfToHtml ( const PDF::Document & input,
const PDPageRange * pages,
const std::filesystem::path & outputFolder,
PDF::ProgressMonitor * progress = nullptr )
inline

Converts a PDF document to HTML format.

Parameters
inputThe input PDF document.
pagesThe range of pages to convert. Pass nullptr to convert all pages.
outputFolderThe folder where the HTML files will be saved.
progressAn optional progress monitor for tracking the conversion progress.

◆ ConvertPdfToPowerPoint()

void PDF::ConvertPdfToPowerPoint ( const PDF::Document & input,
const PDPageRange * pages,
const std::filesystem::path & outputFile,
PDF::ProgressMonitor * progress = nullptr )
inline

Converts a PDF document to PowerPoint format.

Parameters
inputThe input PDF document.
pagesThe range of pages to convert. Pass nullptr to convert all pages.
outputFileThe path of the output PowerPoint file.
progressAn optional progress monitor for tracking the conversion progress.

◆ ConvertPdfToRtf()

void PDF::ConvertPdfToRtf ( const PDF::Document & input,
const PDPageRange * pages,
const std::filesystem::path & outputFile,
PDF::ProgressMonitor * progress = nullptr )
inline

Converts a PDF document to RTF format.

Parameters
inputThe input PDF document.
pagesThe range of pages to convert. Pass nullptr to convert all pages.
recognizeTablesWhether to recognize tables in the converted document.
outputFileThe path of the output RTF file.
progressAn optional progress monitor for tracking the conversion progress.

◆ ConvertPdfToText()

void PDF::ConvertPdfToText ( const PDF::Document & input,
const PDPageRange * pages,
const std::wstring & pageDivider,
bool convertCroppedText,
const std::filesystem::path & outputFile,
PDF::ProgressMonitor * progress = nullptr )
inline

Converts a PDF document to plain text format.

Parameters
inputThe input PDF document.
pagesThe range of pages to convert. Pass nullptr to convert all pages.
pageDividerThe string used to separate pages in the output text.
convertCroppedTextWhether to convert only the cropped text on each page.
outputFileThe path of the output text file.
progressAn optional progress monitor for tracking the conversion progress.

◆ ConvertPdfToWord()

void PDF::ConvertPdfToWord ( const PDF::Document & input,
const PDPageRange * pages,
const std::filesystem::path & outputFile,
PDF::ProgressMonitor * progress = nullptr )
inline

Converts a PDF document to Word format.

Parameters
inputThe input PDF document.
pagesThe range of pages to convert. Pass nullptr to convert all pages.
outputFileThe path of the output Word file.
progressAn optional progress monitor for tracking the conversion progress.