InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SnpExportDocAsPDF Class Reference

Public Member Functions

 SnpExportDocAsPDF ()
 
virtual ~SnpExportDocAsPDF ()
 
ErrorCode ExportDocAsPDF (IDocument *doc, const IDFile &pdfFileName, const PMString &pdfFileFormat)
 
ErrorCode ChooseSaveLocation (IDFile &chosenFile, PMString &pdfFileFormat)
 
K2Vector< PMStringGetDocNames (IDocumentList *docList)
 

Detailed Description

  • Exports a document to a PDF.

This snippet shows how to use the PDF export service provider to export a document to interactive or print PDF.

See Also
IExportProvider

Constructor & Destructor Documentation

SnpExportDocAsPDF::SnpExportDocAsPDF ()
inline

Constructor.

virtual SnpExportDocAsPDF::~SnpExportDocAsPDF ()
inlinevirtual

Destructor.

Member Function Documentation

ErrorCode SnpExportDocAsPDF::ChooseSaveLocation (IDFilechosenFile,
PMStringpdfFileFormat 
)

Choose a PDF filename (IDFile) to save the document, based on the document's filename.

Parameters
chosenFileOUT The file to save.
pdfFileFormatOUT The PDF file format - interactive or print.
Returns
kSuccess if success, kFailure otherwise.
See Also
SDKFileSaveChooser
ErrorCode SnpExportDocAsPDF::ExportDocAsPDF (IDocumentdoc,
const IDFilepdfFileName,
const PMStringpdfFileFormat 
)

Exports a document as interactive or print PDF. This method wraps the the PDF export service provider.

Parameters
docIN The document to export.
pdfFileNameIN The IDFile to which you want to export.
pdfFileFormatIN The PDF file format - interactive or print.
Returns
kSuccess on success, other ErrorCode otherwise.
See Also
IDocument
IExportProvider
K2Vector< PMString > SnpExportDocAsPDF::GetDocNames (IDocumentListdocList)

Gets the names of documents currently available.

Parameters
docListIN The session's document list.
Returns
A list of PMStrings containing names of documents that are currently open.