DocumentIntelligenceClient.GetAnalyzeResultPdf Method

Definition

Overloads

GetAnalyzeResultPdf(String, Guid, RequestContext)

[Protocol Method] Gets the generated searchable PDF output from document analysis.

GetAnalyzeResultPdf(String, Guid, CancellationToken)

Gets the generated searchable PDF output from document analysis.

GetAnalyzeResultPdf(String, Guid, RequestContext)

[Protocol Method] Gets the generated searchable PDF output from document analysis.

public virtual Azure.Response GetAnalyzeResultPdf (string modelId, Guid resultId, Azure.RequestContext context);
abstract member GetAnalyzeResultPdf : string * Guid * Azure.RequestContext -> Azure.Response
override this.GetAnalyzeResultPdf : string * Guid * Azure.RequestContext -> Azure.Response
Public Overridable Function GetAnalyzeResultPdf (modelId As String, resultId As Guid, context As RequestContext) As Response

Parameters

modelId
String

Unique document model name.

resultId
Guid

Analyze operation result ID.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

modelId is null.

modelId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetAnalyzeResultPdf and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential);

Response response = client.GetAnalyzeResultPdf("<modelId>", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

This sample shows how to call GetAnalyzeResultPdf with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential);

Response response = client.GetAnalyzeResultPdf("<modelId>", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

Applies to

GetAnalyzeResultPdf(String, Guid, CancellationToken)

Gets the generated searchable PDF output from document analysis.

public virtual Azure.Response<BinaryData> GetAnalyzeResultPdf (string modelId, Guid resultId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAnalyzeResultPdf : string * Guid * System.Threading.CancellationToken -> Azure.Response<BinaryData>
override this.GetAnalyzeResultPdf : string * Guid * System.Threading.CancellationToken -> Azure.Response<BinaryData>
Public Overridable Function GetAnalyzeResultPdf (modelId As String, resultId As Guid, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BinaryData)

Parameters

modelId
String

Unique document model name.

resultId
Guid

Analyze operation result ID.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

modelId is null.

modelId is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetAnalyzeResultPdf.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential);

Response<BinaryData> response = client.GetAnalyzeResultPdf("<modelId>", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));

This sample shows how to call GetAnalyzeResultPdf with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential);

Response<BinaryData> response = client.GetAnalyzeResultPdf("<modelId>", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));

Applies to