API Reference > Namespaces > OdPdfPublish Namespace > Classes > OdDocument Class > OdDocument Methods > OdDocument::addAttachment Method
OdDocument::addAttachment Method
Syntax
C++
void addAttachment(const OdString& file_name, const OdString& description);
Parameters 
Description 
const OdString& file_name 
[in] A string that contains the name of the file to be attached.  
const OdString& description 
[in] A string that contains the description of the file to be attached. 

Adds a new attachment file to the ODA Publish document. 

 

If there is an existing attachment on the document with the given filename, it will get overwritten.

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