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>
#include <pdfsdk/convert/pdf2json.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, bool ignoreHeadersAndFooters, const std::filesystem::path &outputFile, const std::vector< size_t > &pageIndexes={}, PDF::ProgressMonitor *progress=nullptr)
 Coverts a PDF file (or a part of it) into a MS Word Document format (.docx).
 
void PDF::ConvertPdfToExcel (const PDF::Document &input, ConvertPdfToExcelType convertType, bool keepTablesOnly, const std::filesystem::path &outputFile, const std::vector< size_t > &pageIndexes={}, PDF::ProgressMonitor *progress=nullptr)
 Coverts a PDF file (or a part of it) into a MS Excel Document format (.xlsx).
 
void PDF::ConvertPdfToPowerPoint (const PDF::Document &input, const std::filesystem::path &outputFile, const std::vector< size_t > &pageIndexes={}, PDF::ProgressMonitor *progress=nullptr)
 Coverts a PDF file (or a part of it) into a MS PowerPoint Document format (.pptx).
 
void PDF::ConvertPdfToHtml (const PDF::Document &input, const std::filesystem::path &outputFolder, const std::vector< size_t > &pageIndexes={}, PDF::ProgressMonitor *progress=nullptr)
 Coverts a PDF file (or a part of it) into a HTML Document format (.html).
 
void PDF::ConvertPdfToRtf (const PDF::Document &input, const std::filesystem::path &outputFile, const std::vector< size_t > &pageIndexes={}, PDF::ProgressMonitor *progress=nullptr)
 Coverts a PDF file (or a part of it) into a Rich Text Document format (.rtf).
 
void PDF::ConvertPdfToText (const PDF::Document &input, const std::wstring &pageDivider, bool convertCroppedText, const std::filesystem::path &outputFile, const std::vector< size_t > &pageIndexes={}, PDF::ProgressMonitor *progress=nullptr)
 Coverts a PDF file (or a part of it) into plain text format.
 
void PDF::ConvertPdfToJson (const PDF::Document &input, const std::filesystem::path &outputFile, const std::vector< size_t > &pageIndexes={}, PDF::ProgressMonitor *progress=nullptr)
 Coverts a PDF file (or a part of it) into a JSON 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 onto a separate excel sheet.

PagePerSheet 

Each page is converted onto a separate excel sheet.

DocumentPerSheet 

The entire document is converted onto a single excel sheet.

Function Documentation

◆ ConvertPdfToExcel()

void PDF::ConvertPdfToExcel ( const PDF::Document & input,
ConvertPdfToExcelType convertType,
bool keepTablesOnly,
const std::filesystem::path & outputFile,
const std::vector< size_t > & pageIndexes = {},
PDF::ProgressMonitor * progress = nullptr )
inline

Coverts a PDF file (or a part of it) into a MS Excel Document format (.xlsx).

After the conversion the original Author and Title of the PDF document are preserved and transferred over onto the Excel document.

Parameters
[in]inputA reference to the PDF document object to convert into Excel.
[in]convertTypeThe type of conversion to perform (TablePerSheet, PagePerSheet, DocumentPerSheet).
[in]keepTablesOnlyWhether to keep only the tables in the converted document.
[in]outputFileA reference to the path of the output Excel file.
[in]pageIndexesA reference to the indexes of the pages to convert. The first page of a document has index 0. Pass an empty vector to convert all pages.
[in,out]progressA pointer to an optional progress monitor for tracking the conversion progress page by page. Inherit the class ProgressMonitor and define the needed methods.
See also
ProgressMonitor

◆ ConvertPdfToHtml()

void PDF::ConvertPdfToHtml ( const PDF::Document & input,
const std::filesystem::path & outputFolder,
const std::vector< size_t > & pageIndexes = {},
PDF::ProgressMonitor * progress = nullptr )
inline

Coverts a PDF file (or a part of it) into a HTML Document format (.html).

Parameters
[in]inputA reference to the PDF document object to convert into HTML.
[in]outputFolderA reference to the folder where the HTML file will be saved.
[in]pageIndexesA reference to the indexes of the pages to convert. The first page of a document has index 0. Pass an empty vector to convert all pages.
[in,out]progressA pointer to an optional progress monitor for tracking the conversion progress page by page. Inherit the class ProgressMonitor and define the needed methods.
See also
ProgressMonitor

◆ ConvertPdfToJson()

void PDF::ConvertPdfToJson ( const PDF::Document & input,
const std::filesystem::path & outputFile,
const std::vector< size_t > & pageIndexes = {},
PDF::ProgressMonitor * progress = nullptr )
inline

Coverts a PDF file (or a part of it) into a JSON format.

Parameters
[in]inputA reference to the PDF document object to convert into JSON format.
[in]outputFileA reference to the path of the output JSON file.
[in]pageIndexesA reference to the indexes of the pages to convert. The first page of a document has index 0. Pass an empty vector to convert all pages.
[in,out]progressA pointer to an optional progress monitor for tracking the conversion progress page by page. Inherit the class ProgressMonitor and define the needed methods.
See also
ProgressMonitor

◆ ConvertPdfToPowerPoint()

void PDF::ConvertPdfToPowerPoint ( const PDF::Document & input,
const std::filesystem::path & outputFile,
const std::vector< size_t > & pageIndexes = {},
PDF::ProgressMonitor * progress = nullptr )
inline

Coverts a PDF file (or a part of it) into a MS PowerPoint Document format (.pptx).

Parameters
[in]inputA reference to the PDF document object to convert into PowerPoint.
[in]outputFileA reference to the path to the path of the output PowerPoint file.
[in]pageIndexesA reference to the indexes of the pages to convert. The first page of a document has index 0. Pass an empty vector to convert all pages.
[in,out]progressA pointer to an optional progress monitor for tracking the conversion progress page by page. Inherit the class ProgressMonitor and define the needed methods.
See also
ProgressMonitor

◆ ConvertPdfToRtf()

void PDF::ConvertPdfToRtf ( const PDF::Document & input,
const std::filesystem::path & outputFile,
const std::vector< size_t > & pageIndexes = {},
PDF::ProgressMonitor * progress = nullptr )
inline

Coverts a PDF file (or a part of it) into a Rich Text Document format (.rtf).

Parameters
[in]inputA reference to the PDF document object to convert into RTF.
[in]outputFileThe path of the output RTF file.
[in]pageIndexesA reference to the indexes of the pages to convert. The first page of a document has index 0. Pass an empty vector to convert all pages.
[in,out]progressA pointer to an optional progress monitor for tracking the conversion progress page by page. Inherit the class ProgressMonitor and define the needed methods.
See also
ProgressMonitor

◆ ConvertPdfToText()

void PDF::ConvertPdfToText ( const PDF::Document & input,
const std::wstring & pageDivider,
bool convertCroppedText,
const std::filesystem::path & outputFile,
const std::vector< size_t > & pageIndexes = {},
PDF::ProgressMonitor * progress = nullptr )
inline

Coverts a PDF file (or a part of it) into plain text format.

Parameters
[in]inputA reference to the PDF document object to convert into plain text format.
[in]pageDividerThe string used to separate pages in the output text file.
[in]convertCroppedTextWhether to convert only the cropped text on each page.
[in]outputFileA reference to the path of the output text file.
[in]pageIndexesA reference to the indexes of the pages to convert. The first page of a document has index 0. Pass an empty vector to convert all pages.
[in,out]progressA pointer to an optional progress monitor for tracking the conversion progress page by page. Inherit the class ProgressMonitor and define the needed methods.
See also
ProgressMonitor

◆ ConvertPdfToWord()

void PDF::ConvertPdfToWord ( const PDF::Document & input,
bool ignoreHeadersAndFooters,
const std::filesystem::path & outputFile,
const std::vector< size_t > & pageIndexes = {},
PDF::ProgressMonitor * progress = nullptr )
inline

Coverts a PDF file (or a part of it) into a MS Word Document format (.docx).

After the conversion the original Author and Title of the PDF document are preserved and transferred over onto the Word document.

Parameters
[in]inputA reference to the PDF document object to convert into Word.
[in]ignoreHeadersAndFootersDisable headers and footers analysis.
[in]outputFileA reference to the path of the output Word file.
[in]pageIndexesA reference to the indexes of the pages to convert. The first page of a document has index 0. Pass an empty vector to convert all pages.
[in,out]progressA pointer to an optional progress monitor for tracking the conversion progress page by page. Inherit the class ProgressMonitor and define the needed methods.
See also
ProgressMonitor