Watson document conversion not working for my downloaded pdf files

时间:2016-04-25 09:29:23

标签: ibm-watson

i tried following the steps mentioned "https://github.com/watson-developer-cloud/document-conversion-nodejs" and is able to load the app which works well with sample pdf file.

But when i try using my pdf file it throws error "Missing required parameters: either params.file or params.document_id must be specified" Also in the above mentioned git hub link the step 7 is not clear, it mentions run node setup.js but i am not able to find out that file.

has anybody faced this kind of issue.Kindly reply.

1 个答案:

答案 0 :(得分:1)

感谢您在document-conversion-nodejs repo中指出令人困惑的第7步。这不是一个有效的步骤,我已提交拉取请求以将其删除。

如果您正在尝试这样做,您应该可以使用自己的文件更改示例文件。我需要看一些你的代码,以便弄清楚它是怎么回事。

还有一个备用存储库[watson-developer-cloud / node-sdk],您也可以使用它来创建NodeJS应用程序。它还有一个关于如何运行服务的示例(examples / document_conversion.v1.js)。

除了输入您的服务凭证之外,您需要做的就是将要转换的文档放在"资源"文件夹并指向此行:

  

fs.createReadStream(__ dirname +' / resources / YOUR_DOCUMENT')

tutorialAPI documentation也可能有所帮助。