Function Azure that allows to convert an XML file to an HTML file following the standards for electronic invoices set by Servicio de Impuestos Internos.
Transforms the node "TED" to a barcode PDF417 and embeds it in the result as base64 image then, transforms the content via an XLST template. The file template must be hosted in an Azure storage blob container for consume.
The resulting file is content ready to convert to PDF in browser.
Azure Funtions 4.1.1 |
ZXing.Net 0.16.9 |
ZXing.Net Drawing 0.16.5-beta |
- File template in format XSL/XSLT. (XslCompiledTransform Class)
- DTE Document node.
This function can be hosted on a server and called from a POST request, upload the file and wait for the result in HTML content. You need config the Blob Container for host the template.
Curl:
curl --location 'http://localhost:30374/api/convert' --header 'Content-Type: application/xml' --data '@/C:/Users/.../file.xml'
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"ADConfig:Container": "templates-xslt", // Blob Container name
"ADConfig:Template": "dte_fromat.xsl" // template name
}
If the templates not exists into Blob Container you may use template from "Resources" proyect.
Feel free to file a new issue with a respective title and description on the FunctionHtmlConvert/issues repository.
I think that Knowledge Doesn’t Belong to Just Any One Person, and I always intend to share my knowledge with other developers, a voluntary monetary contribution or contribute ideas and/or comments to improve these tools would be appreciated.
All my repository content is released under the terms of the MIT License.