API Reference > Namespaces > OdPdfPublish Namespace > Classes > OdFile Class > OdFile Methods > exportPdf Method > OdFile::exportPdf Method (OdDocumentPtr&, OdString&)
OdFile::exportPdf Method (OdDocumentPtr&, OdString&)
Syntax
C++
OdUInt32 exportPdf(OdDocumentPtr& doc, const OdString& file);
Parameters 
Description 
OdDocumentPtr& doc 
[in] A smart pointer to the document instance.  
const OdString& file 
[in] A full path to the output file.
 

Returns the result of the write operation. If data has been written successfully, returns eOk, otherwise returns an error code.

Writes specified document content to a specified file.

If a PDFToolkit exception occurs, the method returns an error code from the PDFToolkit level. If another exception occurs, the method returns the particular error code. If an unknown exception occurs, the method returns the eInternalError value.

Copyright © 2002–2020. Open Design Alliance. All rights reserved.