Skip to Main Content

Document Generator Pre-Built Function

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

OCI Pre built function 'Document Generator' error out when using image data

Ashok AnnamApr 8 2024 — edited Mar 11 2025

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"

This post has been answered by Francois Robert-Oracle on Mar 10 2025
Jump to Answer

Comments

Processing

Post Details

Added on Apr 8 2024
1 comment
488 views