【发布时间】:2015-06-24 02:31:16
【问题描述】:
我正在尝试使用 Datalogics PDF (https://api.datalogics-cloud.com/docs#fillform) 在我的 rails 应用程序中填写可填写的 pdf(使用 adobe acrobat 制作)。
我很难弄清楚如何进行 api 调用。 IE。我不知道在哪里/如何放置参数。任何帮助深表感谢!谢谢!
其中一个示例是使用 curl,因此在控制器操作中,我将 curl https://pdfprocess.datalogics.com/api/actions/render/pages --insecure --form 'application={"id": "xxxxx", "key": "xxxxxxx"}' --form input=@hello_world.pdf --form inputName=hello_world.pdf --output flattened.pdf 将 pdf hello_world(位于我的 rails 根目录中)展平为名为 flattened.pdf 的 pdf。
我不知道如何理解这段代码。
另外,我考虑过不使用控制器,而是使用动作为 url 并具有各个字段标签的表单,这是一种有效的可能性吗?
对于填写表格,我正在尝试这个 curl 命令:
`curl https://pdfprocess.datalogics.com/api/actions/fill/form --insecure --form 'application={"id": "xxxxx", "key": "xxxxxx"}' --form input=@private/fillable/CG1218_6-95.pdf --form filename=@input.json --output flattened.pdf`
【问题讨论】:
-
你能告诉我们你到目前为止得到了什么,以及你遇到的任何错误吗?你还试过什么等??? (注意:不要把它放在 cmets 中,编辑你的问题并添加它,因为这些东西应该是你问题的一部分)
标签: ruby-on-rails pdf