Copy link to clipboard
Copied
We have created a document in HTML and used CSS to resize it to the size of an A5 document. If we call the API via the create request and set the key "contentAnalyzerRequests" in the body with the following value:
{
"cpf:inputs": {
"params": {
"cpf:inline": {
"print": {
"includeHeaderFooter": true
},
"pageLayout": {
"pageHeight": 5.8,
"pageWidth": 8.3
},
"json": "{\"k1\": \"v1\", \"k2\": \"v2\"}"
}
},
"documentIn": {
"cpf:location": "InputFile0",
"dc:format": "application/zip"
}
},
"cpf:engine": {
"repo:assetId": "urn:aaid:cpf:Service-e2ee120a2b06427cb449592f5db967e7"
},
"cpf:outputs": {
"documentOut": {
"cpf:location": "multipartLabelOut",
"dc:format": "application/pdf"
}
}
}
We get the following response back:
{
"cpf:inputs": {
"params": {
"cpf:inline": {
"print": {
"includeHeaderFooter": true
},
"pageLayout": {
"pageHeight": 5.8,
"pageWidth": 8.3
},
"json": "{\"k1\": \"v1\", \"k2\": \"v2\"}"
}
},
"documentIn": {
"cpf:location": "InputFile0",
"dc:format": "application/zip"
}
},
"cpf:engine": {
"repo:assetId": "urn:aaid:cpf:Service-e2ee120a2b06427cb449592f5db967e7"
},
"cpf:outputs": {
"documentOut": {
"cpf:location": "multipartLabelOut",
"dc:format": "application/pdf"
}
}
}
but then when we do the get-reuqest "poll" we get the PDF document as an A4 document. The upper half is our desired content and below it a white-gray block to fill the A4 document. Here is the response of the pull-request:
{
"cpf:inputs":{
"params":{
"cpf:inline":{
"print":{
"includeHeaderFooter":true
},
"pageLayout":{
"pageHeight":5.8,
"pageWidth":8.3
},
"json":"{\"k1\": \"v1\", \"k2\": \"v2\"}"
}
},
"documentIn":{
"cpf:location":"InputFile0",
"dc:format":"application/zip"
}
},
"cpf:engine":{
"repo:assetId":"urn:aaid:cpf:Service-e2ee120a2b06427cb449592f5db967e7"
},
"cpf:status":{
"completed":true,
"type":"",
"status":200
},
"cpf:outputs":{
"documentOut":{
"cpf:location":"multipartLabelOut",
"dc:format":"application/pdf"
}
}
}
Have something to add?