SaveDOCXToFile
Document conversion, extraction, DOCX, files
Description
Converts a PDF page range into an editable DOCX file containing native paragraphs, headings, lists, tables, styles, page breaks, and optional images
Syntax
Delphi
Function TPDFlib.SaveDOCXToFile(Const PageRange: WideString;
Options: Integer; Const FileName: WideString): Integer;ActiveX
Function PDFlib::SaveDOCXToFile(PageRange As String,
Options As Long, FileName As String) As LongDLL
int DLSaveDOCXToFile(int InstanceID, const wchar_t* PageRange,
int Options, const wchar_t* FileName);
int DLSaveDOCXToFileA(int InstanceID, const char* PageRange,
int Options, const char* FileName);Parameters
| PageRange | A one-based page range, or an empty string for every page |
|---|---|
| Options | The option mask documented by SaveDOCXToStream |
| FileName | The destination DOCX file path |
Return values
Returns the number of converted pages, or zero when validation, extraction, packaging, or file writing fails
Remarks
The file is a standard WordprocessingML package and requires no Office automation or external conversion process
Images are written page by page and the selected PDF page is restored before the call returns
LastErrorCode is 114 for invalid arguments and 518 for extraction, packaging, or file failures