This snippet shows how to use the kBookExportActionCmdBoss to export a book in various ways to PDF. When you export to PDF, you can export all of the book contents, or specific book contents.
- See Also
- kBookExportActionCmdBoss
- IBookOutputActionCmdData
- IPDFExportPrefs
- kSetPDFExportPrefsCmdBoss
| SnpExportBookAsPDF::SnpExportBookAsPDF | ( | | ) | |
| inline |
| virtual SnpExportBookAsPDF::~SnpExportBookAsPDF | ( | | ) | |
| inlinevirtual |
Exports a book as PDF. This method wraps the kBookExportActionCmdBoss.
- Parameters
| book | IN The book to export. |
| pdfFileName | IN The IDFile to which you want to export. |
| bookContentsToExport | IN UIDList containing the specific book contents to export. This is ignored if exportAllDocsInBook is kTrue. |
| exportAllDocsInBook | IN A flag to specify if you want all of the book content to be exported. Default: kTrue. |
| options | IN UI Options for the operation. By default, this is set to IBookOutputActionCmdData::kSuppressEverything, which will not show any dialog. Refer to the comments in the Run() method for more details on how to change the PDF Export preferences programmatically. |
- Returns
- kSuccess on success, other ErrorCode otherwise.
- See Also
- IBookOutputActionCmdData::OutputUIOptions
- IBook
- IBookManager
- IBookContentMgr
Gets the names of contents in a book.
- Parameters
| bookContentMgr | IN The book's content manager. |
- Returns
- A list of PMStrings containing names of contents (documents) in the book.
Gets the names of books currently available.
- Parameters
| bookManager | IN The session's book manager. |
- Returns
- A list of PMStrings containing names of books that are currently open.
| int32 SnpExportBookAsPDF::GetCurrentPDFExportStyle | ( | void | | ) | |
Returns the index of the current PDF export style
- Returns
- The index of the current PDF export style. This index is from the IGenStlEdtListMgr/IPDFExptStyleListMgr styles that are for exporting.
Gets the names of PDF export styles.
- Returns
- List of PDF export styles by their names.
| const IDFile SnpExportBookAsPDF::MakePDFFilename | ( | IBook * | book | ) | |
Makes a PDF filename (IDFile) for the book, based on the book's filename. It just replaces the .indb with .pdf.
- Parameters
| book | IN The book that you want to export. |
- Returns
- IDFile for the PDF to export.
- See Also
- SDKFileHelper
| ErrorCode SnpExportBookAsPDF::SetPDFExportStyleByIndex | ( | int32 | pdfStylesIndex | ) | |
Sets the PDF export style by index.
- Parameters
| pdfStylesIndex | IN The index of the IGenStlEdtListMgr/IPDFExptStyleListMgr styles. Note that all import and export styles are grouped together. |
- Returns
- kSuccess if success, kFailure otherwise.