Saves the file after all the changes are made. The type of the file which will be saved needs to be set.
Name | Type | Description |
sExtension | const wchar_t* | The file extension. The following values are possible: docx, odt, rtf, txt, pptx, xlsx, ods, csv, pdf (see AVS_OFFICESTUDIO_FILE_XXX values). |
sPath | const wchar_t* | The path to the file to be saved together with its name and extension. |
sParams | const wchar_t* | The parameters needed for the correct file saving (most commonly, the encoding is used for the txt and csv file types or the delimiter for the csv files,
for other file types this is just an empty string). The parameters are added in the form of XML tags, where m_nCsvTxtEncoding is used for the text encoding
and m_nCsvDelimiter is used for the csv delimiter. You can find all the supported values for the encoding in this file.
The supported values for the csv delimiters include:
|
std::wstring sWorkDirectory = NSUtils::GetBuilderDirectory(); CDocBuilder::Initialize(sWorkDirectory.c_str()); CDocBuilder oBuilder; std::wstring sDstPath = sProcessDirectory + L"/result.docx"; oBuilder.SaveFile("docx", sDstPath.c_str()); CDocBuilder::Dispose();
builder.SaveFile("docx", "result.docx");
ONLYOFFICE Document Builder allows to save your document files into image files creating thumbnails of the first page or of all the pages in the document. This is done using the parameters of the SaveFile() method. The parameters are added in the form of XML tags, where the following tags can be used:
oBuilder.SaveFile(OFFICESTUDIO_FILE_IMAGE, L"thumbnail.png", "<m_oThumbnail><format>4</format><aspect>1</aspect><first>false</first><width>1000</width><height>1000</height></m_oThumbnail>");
builder.SaveFile("image", "./thumbnail.png", "<m_oThumbnail><format>4</format><aspect>1</aspect><first>false</first><width>1000</width><height>1000</height></m_oThumbnail>");