Downloading Documents
  • 18 Nov 2024
  • 5 Minutes à lire
  • Sombre
    Lumière
  • PDF

Downloading Documents

  • Sombre
    Lumière
  • PDF

Résumé de l’article

Java SDK.NET SDKREST APIAPEX SDK

Java SDK

To download the full code sample see our Code Share site. For extra tips on how to bulk download transactions, see our blog post.

Any documents uploaded during the creation of a document package can be downloaded at any given time.

Downloading Documents

The EslClient.downloadDocument() method can be called both before and after the package's completion. If called before, the documents will be flattened, removing all pending signatures and fields.

FileOutputStream stream1 = new FileOutputStream("C:/Users/hhaidary/Desktop/Example/signed_document.pdf");
				// Retrieve the bytes of the document (with fields)
				byte[] pdfDocumentBytes = eslClient.downloadDocument(packageId, documentId);
	    
				try{
				stream1.write(pdfDocumentBytes);
				} finally {
				stream1.close();
			}

Downloading the Original Documents

The EslClient.downloadOriginalDocument() method can be called both before and after the package's completion. It retrieves the original document that was uploaded by the sender, without any signatures and fields.

FileOutputStream stream2 = new FileOutputStream("C:/Users/hhaidary/Desktop/Example/original_document.pdf");
				// Retrieve the bytes of the original document (without fields)
				byte[] originalPdfDocumentBytes = eslClient.downloadOriginalDocument(packageId, documentId);
	    
				try{
				stream2.write(originalPdfDocumentBytes);
				} finally {
				stream2.close();
			}

Downloading Signed Documents

The EslClient.downloadZippedDocuments() method can only be called after all signing has been completed. Once called, the method will deliver an archive containing all signed documents.

FileOutputStream stream3 = new FileOutputStream("C:/Users/hhaidary/Desktop/Example/signed_documents.zip");
				// Retrieve the bytes of the zipped file containing all the documents in the package
				byte[] zippedDocumentsBytes = eslClient.downloadZippedDocuments(packageId);
	    
				try{
				stream3.write(zippedDocumentsBytes);
				} finally {
				stream3.close();
			}

Downloading an Audit Trails

The EslClient.downloadEvidenceSummary() method can be called both before and after the package's completion. It retrieves the current audit trail activity for the package.

FileOutputStream stream4 = new FileOutputStream("C:/Users/hhaidary/Desktop/Example/evidence_summary.pdf");
				//Retrieve the bytes of the evidence summary
				byte[] evidenceBytes = eslClient.downloadEvidenceSummary(packageId);
	    
				try{
				stream4.write(evidenceBytes);
				} finally {
				stream4.close();
			}

Results

Once you have run your code, you will find your files in the location where you chose to save your files.

.NET SDK

To download the full code sample see our Code Share site. For extra tips on how to bulk download transactions, see our blog post.

Any documents uploaded during the creation of a document package can be downloaded at any given time.

Downloading Documents

The EslClient.DownloadDocument() method can be called both before and after the package's completion. If called before, the documents will be flattened, removing all pending signatures and fields.

// Retrieve the bytes of the document (with fields)
				byte[] pdfDocumentBytes = eslClient.DownloadDocument(packageId, documentId);
			File.WriteAllBytes("C:/Users/hhaidary/Desktop/Example/signed_document.pdf", pdfDocumentBytes);

Downloading the Original Documents

The EslClient.DownloadOriginalDocument() method can be called both before and after the package's completion. It retrieves the original document that was uploaded by the sender, without any signatures and fields.

// Retrieve the bytes of the original document (without fields)
				byte[] originalPdfDocumentBytes = eslClient.DownloadOriginalDocument(packageId, documentId);
			File.WriteAllBytes("C:/Users/hhaidary/Desktop/Example/original_document.pdf", originalPdfDocumentBytes);

Downloading Signed Documents

The EslClient.DownloadZippedDocuments() method can only be called after all signing has been completed. Once called, the method will deliver an archive containing all signed documents.

// Retrieve the bytes of the zipped file containing all the documents in the package
				byte[] zippedDocumentsBytes = eslClient.DownloadZippedDocuments(packageId);
			File.WriteAllBytes("C:/Users/hhaidary/Desktop/Example/signed_documents.zip", zippedDocumentsBytes);

Downloading an Audit Trail

The EslClient.DownloadEvidenceSummary() method can be called both before and after the package's completion. It retrieves the current audit trail activity for the package.

//Retrieve the bytes of the evidence summary
				byte[] evidenceBytes = eslClient.PackageService.DownloadEvidenceSummary(packageId);
			File.WriteAllBytes("C:/Users/hhaidary/Desktop/Example/evidence_summary.pdf", evidenceBytes);

Results

Once you have run your code, you will find your files in the location where you chose to save your files.

REST API

To download the full code sample see our Code Share site. For extra tips on how to bulk download transactions, see our blog post.

Any documents uploaded during the creation of a document package can be downloaded at any given time.

Downloading Documents

The DownloadDocument() call can be called both before and after the package's completion. If called before, the documents will be flattened, removing all pending signatures and fields.

HTTP Request

 GET https://sandbox.esignlive.com/api/packages/{packageId}/documents/{documentId}/pdf 

HTTP Headers

Accept: application/pdf
Content-Type: application/json   
Authorization: Basic api_key 

Downloading the Original Documents

The DownloadOriginalDocument() call can be called both before and after the package's completion. It retrieves the original document that was uploaded by the sender, without any signatures and fields.

HTTP Request

 GET https://sandbox.esignlive.com/api/packages/{packageId}/documents/{documentId}/original

HTTP Headers

Accept: application/pdf
Content-Type: application/json   
Authorization: Basic api_key 

Downloading Signed Documents

The DownloadZippedDocuments() call can only be called after all signing has been completed. Once called, the method will deliver an archive containing all signed documents.

HTTP Request

 GET https://sandbox.esignlive.com/api/packages/{packageId}/documents/zip

HTTP Headers

Accept: application/pdf
Content-Type: application/json   
Authorization: Basic api_key 

Downloading an Audit Trail

The DownloadEvidenceSummary() call can be called both before and after the package's completion. It retrieves the current audit trail activity for the package.

HTTP Request

 GET https://sandbox.esignlive.com/api/packages/{packageId}/evidence/summary

HTTP Headers

Accept: application/pdf
Content-Type: application/json   
Authorization: Basic api_key 

Downloading Signed Documents and the Audit Trail

The following API call can only be called after all signing has been completed. It retrieves the current audit trail as well as all the signed documents.

HTTP Request

 GET https://sandbox.esignlive.com/api/packages/{packageID}/download?evidenceSummary=true&documents=true

HTTP Headers

Accept: application/pdf
Content-Type: application/json   
Authorization: Basic api_key 

Results

Once you have run your code, you will find your files in the location where you chose to save your files.

APEX SDK

To download the full code sample see our Code Share site. For extra tips on how to bulk download transactions, see our blog post.

Any documents uploaded during the creation of a document package can be downloaded at any given time.

Downloading Documents

The sdk.downloadDocument() method can be called both before and after the package’s completion. If called before, the documents will be flattened, removing all pending signatures and fields.

    	//download signed document
				Blob signedDocument = sdk.downloadDocument(packageId, documentId);
				Document doc1 = new Document();
				doc1.Body = signedDocument;
				doc1.FolderId = folder.id;
				doc1.Name = 'test retrieving document - sigend document';
				doc1.Type = 'pdf';
			insert doc1;

Downloading the Original Documents

The downloadOriginalDocument() method can be called both before and after the package’s completion. It retrieves the original document that was uploaded by the sender, without any signatures and fields.

    	//download original document
				Blob originalDocument = downloadOriginalDocument(packageId, documentId);
				Document doc2 = new Document();
				doc2.Body = originalDocument;
				doc2.FolderId = folder.id;
				doc2.Name = 'test retrieving document - original document';
				doc2.Type = 'pdf';
			insert doc2;

Downloading Signed Documents

The downloadZippedDocuments() method can only be called after all signing has been completed. Once called, the method will deliver an archive containing all signed documents.

    	//download zipped document
				Blob zippedDocuments = downloadZippedDocuments(packageId);
				Document doc3 = new Document();
				doc3.Body = zippedDocuments;
				doc3.FolderId = folder.id;
				doc3.Name = 'test retrieving document - zipped documents';
				doc3.Type = 'zip';
			insert doc3;

The sdk.getAudit() method can be called both before and after the package’s completion. It retrieves the current audit trail activity for the package.

    	//download evidence summary
				String auditString= sdk.getAudit(packageId);
				Document doc4 = new Document();
				doc4.Body = EncodingUtil.base64Decode(auditString);
				doc4.FolderId = folder.id;
				doc4.Name = 'test retrieving document - evidence summary';
				doc4.Type = 'pdf';
			insert doc4;

Results

Once you have run your code, you will find your files in the location where you chose to save your fileS.


Cet article vous a-t-il été utile ?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, facilitant la découverte de connaissances grâce à l’intelligence conversationnelle