1. A document conversion apparatus for converting a format of a structured document using a template, the document conversion apparatus comprising: a computer processor; and a memory that stores at least one computer program executed by the computer processor, the at least one computer program comprising program code that, when executed by the computer processor, implements: a first determining unit configured to determine whether a binary format is specified as an output format of the structured document in the template; a command acquiring unit configured to acquire a processing command for the structured document from the template used for converting the format of the structured document in a case where the first determining unit determines that the binary format is specified as the output format of the structured document; a second determining unit configured to, in a case where the processing command acquired by the command acquiring unit is a command for outputting a part of the structured document, determine whether an output format of the part of the structured document is specified in the template; and a writing unit configured to, in a case where the output format of the part of the structured document is specified in the template, perform binary conversion associated beforehand with the output format on the part of the structured document and write a result of the binary conversion in a file for storing output data, and in a case where the output format of the part of the structured document is not specified in the template, write the part of the structured document in the file.
2. The document conversion apparatus according to claim 1 , wherein the at least one computer program further comprises program code that, when executed by the computer processor, implements: a processing unit configured to receive a structured document including a first document element and a second document element, the processing unit configured to process a template; a converting unit configured to perform a first binary conversion algorithm on the first document element and to perform a second binary conversion algorithm on the second document element, wherein the second binary conversion algorithm is different from the first binary conversion algorithm; and an output unit configured to output the structured document in the binary format.