我们正在寻找下载合并的pdf,然后提取单个文件(不是我的想法)。我尝试使用pdfsharp对付我的pdf,但没有在单个文档上看到任何标题信息。我只是想知道这是否可能。如果我使用pdfsharp,它可以取出所有页面,但我无法真正知道哪些页面属于文档。Docusign合并pdf - 我们可以提取单个文件吗?
1
A
回答
2
后创建的DocuSign信封您可以阅读信封中的文件信息,并记住每个文档的页数。如果您正在使用模板,这也应该可以工作。
您可以使用EnvelopeDocuments: list API来获取文档信息,其中包括每个文档的页面。然后,当您需要从组合PDF中提取单个文档时,您将知道将单个文档分开的位置。
这里有一个列表文件调用示例API响应:
{
"envelopeDocuments": [
{
"availableDocumentTypes": [
{
"isDefault": "true",
"type": "electronic"
}
],
"display": "inline",
"documentId": "1",
"includeInDownload": "true",
"name": "NDA.pdf",
"order": "1",
"pages": "3",
"signerMustAcknowledge": "no_interaction",
"type": "content",
"uri": "/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/1"
},
{
"availableDocumentTypes": [
{
"isDefault": "true",
"type": "electronic"
}
],
"display": "inline",
"documentId": "2",
"includeInDownload": "true",
"name": "House.pdf",
"order": "2",
"pages": "1",
"signerMustAcknowledge": "no_interaction",
"type": "content",
"uri": "/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/2"
},
{
"availableDocumentTypes": [
{
"isDefault": "true",
"type": "electronic"
}
],
"display": "inline",
"documentId": "3",
"includeInDownload": "true",
"name": "contractor_agreement.docx",
"order": "3",
"pages": "2",
"signerMustAcknowledge": "no_interaction",
"type": "content",
"uri": "/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/3"
},
{
"availableDocumentTypes": [
{
"isDefault": "true",
"type": "electronic"
}
],
"display": "inline",
"documentId": "certificate",
"includeInDownload": "true",
"name": "Summary",
"order": "999",
"pages": "4",
"signerMustAcknowledge": "no_interaction",
"type": "summary",
"uri": "/envelopes/44efc9e6-915e-4b1d-9b54-801410d6922d/documents/certificate"
}
],
"envelopeId": "44efc9e6-915e-4b1d-9b54-801410d6922d"
}
2
getEnvelopeDocuments api有一个选项,可以将信封中的所有文档作为zip文件下载。您可以解压缩文件并获取单个文档。
GET /v2/accounts/{accountId}/envelopes/{envelopeId}/documents/archive
检索包含所有用于语音认证的PDF文档,证书,以及任何.WAV文件的ZIP文件。
这里是一个示例代码下载的zip文件,并使用Docusign C# SDK将其解压缩。
完整示例here。
var envApi = new EnvelopesApi();
// GetDocument() API call returns a MemoryStream
var docStream = envApi.GetDocument(accountId, envelopeId, "archive");
// let's save the document to local file system
string zipName = Path.GetRandomFileName();
string zipfilePath = @"C:\temp\" + zipName + ".zip";
using (var fs = new FileStream(zipfilePath, FileMode.Create))
{
docStream.Seek(0, SeekOrigin.Begin);
docStream.CopyTo(fs);
}
string extractPath = @"c:\temp\" + zipName;
System.IO.Compression.ZipFile.ExtractToDirectory(zipfilePath, extractPath);
编辑(凯西 - 洛瑞)
出于某种原因,我不得不铸流到FileStream对象的问题。我所做的却是以下几点:
Stream docStream = envApi.GetDocument(AccountId, envelopeId, "archive");
MemoryStream ret = new MemoryStream();
byte[] buffer = new byte[8192];
int bytesRead;
while ((bytesRead = docStream.Read(buffer, 0, buffer.Length)) > 0)
{
ret.Write(buffer, 0, bytesRead);
}
ret.Position = 0;
using (var fs = new FileStream(@"C:\temp\envelopeDocuments.zip", FileMode.Create))
{
ret.CopyTo(fs);
}
相关问题
- 1. 我们可以提交单个文件吗?
- 2. 我们可以从刻录设置中提取msi文件吗?
- 3. 我们可以从evernote文件中提取文本内容吗
- 4. 取消合并XML文件,可以吗?
- 5. 我可以从PDF中提取中文文本并转换成英文吗?
- 6. 我们可以提交没有提交按钮的PDF表单吗?
- 7. 我们可以将两个dgml图合并成一个吗?
- 8. 我们可以使用iText压缩PDF文件大小吗?
- 9. 我们可以使用php阅读pdf文件的内容吗?
- 10. iPhone:我们可以使用UIWebView打开pdf文件吗?
- 11. 我们可以使用Hadoop MapReduce合并两个文件代码
- 12. 我可以将这两个.htaccess文件合并为一个吗?
- 13. 我们可以合并两个片段容器吗?
- 14. 我们可以使用Flex合并2个视频吗?
- 15. PowerShell可以提取.tgz文件吗?
- 16. 我可以将html5shiv.js和respond.min.js合并到一个文件中吗?
- 17. 你可以将多个文件合并成一个文件吗?
- 18. 我们可以将CSS和JS文件组合成一个文件吗?
- 19. 我们可以使用reportlab创建交互式PDF表单吗?
- 20. 合并几个pdf文件
- 21. 我们可以使用单个ASP.NET FileUpload控件添加多个文件吗?
- 22. 我们可以将iFrame整合到PHP文件中吗?
- 23. 我们可以通过solr配置文件提升字段吗?
- 24. 我们可以使用lua脚本提取PDF页面
- 25. treeview.resources:它们可以被提取吗?
- 26. Docusign API与ColdFusion检索PDF - 文件/合并
- 27. 可以将sIFR js文件合并为1个js文件吗?
- 28. 我们可以整合声纳吗?
- 29. 我们可以结合git标签吗?
- 30. 我们可以整合Dynamodb和Wavemaker吗?
我不知道该存档选项。很高兴知道。 –
我会在这里向所有人介绍我的所有发现,他们可以做出决定。知道如何以不同的方式去皮肤,这是很好的。感谢所有的帮助。 –
哇。我不知道有语音验证功能。我不认为我们会使用它,但如果我们确实需要它,它确实有它。 –