Ibm Watson Document Conversion Not Working
I recently implemented the Document Conversion API from IBM Watson. I always get an encoding error for converting pdf document!!! #!/usr/bin/env python #coding: utf-8 import json
Solution 1:
enter code here
Your error is the config JSON. Your still using the word config instead of the pdf config JSON:
{"pdf":{"heading":{"fonts":[{"level":1,"min_size":24},{"level":2,"min_size":18,"max_size":23,"bold":true},{"level":3,"min_size":14,"max_size":17,"italic":false},{"level":4,"min_size":12,"max_size":13,"name":"Times New Roman"}]}}}
If you want to use answer units please add this to your config file as well:
var config = {
conversion_target: "answer_units",
"pdf": {
"heading": {
"fonts": [{
"level": 1,
"min_size": 24,
"max_size": 80
},
{
"level": 2,
"min_size": 18,
"max_size": 24,
"bold": false,
"italic": false
},
{
"level": 2,
"min_size": 18,
"max_size": 24,
"bold": true
},
{
"level": 3,
"min_size": 13,
"max_size": 18,
"bold": false,
"italic": false
},
{
"level": 3,
"min_size": 13,
"max_size": 18,
"bold": true
},
{
"level": 4,
"min_size": 11,
"max_size": 13,
"bold": true,
"italic": false
}
]
}
}
}
description: https://www.ibm.com/watson/developercloud/doc/document-conversion/customizing.html
Post a Comment for "Ibm Watson Document Conversion Not Working"