LUA object: document

The document object represents a printout of the program. Once created, several documents can be merged together.

AvailabilityThe object is returned by a method or a property of another object
d  = dataview.createdocument("203caa97-4971-4d43-a1fc-d99a81744508")

d2 = database.createdocument("e056de31-51ad-4622-93c5-75e01474c877","items","9e092d0d-62cc-4714-9da8-0672f74e1b4d")

d.adddocument(d2)

d.show()

adddocument

DescriptionAdds the pages of another document to the current one
Value Type
Formatdocument.adddocument(document2)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
document2documentThe document object from which to retrieve the pages
Examples
document.adddocument(document2)

gethtml

DescriptionConverts the document to html format
Value Typestring
Formatstring = document.gethtml()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
body = document.gethtml()

savehtml

DescriptionSaves the document in html format
Value Type
Formatdocument.savehtml(pathfile)
TypeMethod
SystemsWindows
ParameterValue TypeDescription
pathfilestringThe path and the file name to save

savepdf

DescriptionSaves the document in pdf format
Value Type
Formatdocument.savepdf(pathfile)
TypeMethod
SystemsWindows
ParameterValue TypeDescription
pathfilestringThe path and the file name to save

show

DescriptionDisplays the preview of the current document
Value Type
Formatdocument.show()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
document.show()

uploadtoserver

DescriptionSends the document to the Nios4 server and returns the link to download the file
Value Typestring
Formatstring = document.uploadtoserver(filename)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
filenamestringThe name that will be used to save the document on the Nios4 server
Examples
url = document.uploadtoserver("document.pdf")