DocLang is an XML description of a document made for language models. It records what each element of a document is (a heading, a paragraph, a table, a picture), where it sits on its page and how its pieces connect. Learn more about the format in the DocLang project.
GroupDocs.Conversion supports two DocLang file types, both as a source and as a target, since version 26.11:
A DocLang archive: an Open Packaging Conventions package that holds the DocLang markup, the pictures of the document and, optionally, a picture of every page.
Supported DocLang conversions
To DocLang: every document that converts to a Word format converts to DCLG and DCLX — PDF, Word-processing, spreadsheet, presentation, email and Outlook, web, eBook, image, CAD, diagram, note, page description language, project management, Publisher, GIS, XML and JSON documents, and the documents inside archives.
From DocLang: a DocLang document converts to every format a DOCX document converts to — PDF, Word-processing, web, image, spreadsheet, presentation, eBook, page description language (XPS, PS, PCL) and SVG. DocLang to DocLang is not supported.
Convert to DocLang
Pass DocLangConvertOptions to the Convert method. By default the output is a DCLX archive that records where each element is on its page:
Bare DocLang markup cannot hold page pictures. Setting IncludePageImages to true together with Format = DocLangFileType.Dclg fails the conversion with InvalidConvertOptionsException: “DocLangConvertOptions.IncludePageImages cannot be combined with the dclg format: bare DocLang markup cannot hold page pictures. Use the dclx format for page pictures.”
Convert from DocLang
Load a DCLG or DCLX document like any other source and choose the target format:
A DocLang document is read into a Word document first, so the page count that GetDocumentInfo reports is the page count of that Word document. To load a stream that has no file name, or to state the format, use DocLangLoadOptions.
Note
Refer to the API reference for all DocLang convert options.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Ask AI
Ask anything about this page — the answer is based on its content.
Searching the docs and writing an answer…
Something went wrong while getting an answer. Please try again in a moment.