CDocBuilder

new CDocBuilder

Base class used by ONLYOFFICE Document Builder for the document file (text document, spreadsheet, presentation, form document, PDF) to be generated.

Methods

NameDescription
closeFileCloses the file to stop working with it.
createFileCreates a new file.
disposeUnloads the ONLYOFFICE Document Builder from the application memory when it is no longer needed.
executeCommandExecutes the command which will be used to create the document file (text document, spreadsheet, presentation, form document, PDF).
getContextReturns the current JS context.
getVersionReturns the ONLYOFFICE Document Builder engine version.
initializeInitializes the ONLYOFFICE Document Builder as a library for the application to be able to work with it.
isSaveWithDoctrendererModeSpecifies if the doctrenderer mode is used when building a document or getting content from the editor when saving a file.
openFileOpens the document file which will be edited and saved afterwards.
runRuns the ONLYOFFICE Document Builder executable.
runTextRuns all the commands for the document creation using a single command.
saveFileSaves the file after all the changes are made.
setPropertySets an argument which can be transferred to the program outside the CDocBuilder.executeCommand method.
setTmpFolderSets the path to the folder where the program will temporarily save files needed for the program's correct work.
writeDataWrites data to the log file.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).