When I tried to generate PDF's using the OCI new pre-built function ‘Document Generator’ , Its erroring out as below for image data in the request body template.
I was using data as below. Can some one please explain how to use both JSON dataset and image data to get in PDF output
{
"requestType": "SINGLE",
"tagSyntax": "DOCGEN_1_0",
"data": {
"source": "OBJECT_STORAGE",
"objectName": "logo.png",
"namespace": "********",
"bucketName": "mybucket",
"mediaType": "image/png",
"width": "180px",
"height": "100px"
},
"template": {
"source": "OBJECT_STORAGE",
"namespace": "********",
"bucketName": "mybucket",
"objectName": "312_fup_template.docx",
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
},
"output": {
"target": "OBJECT_STORAGE",
"namespace": "********",
"bucketName": "mybucket",
"objectName": "312_fup_report.pdf",
"contentType": "application/pdf"
}
}
Error:
"error": "Validation error: JSON Parsing error near 'iaType\": \"image/png\"' at Line: 9, Column: 27. Error: Unrecognized field \"mediaType\" (class com.oracle.dbtoolbox.docgen.commons.model.RequestSingleDataObjectStorage$Builder), not marked as ignorable"