49 lines
2.2 KiB
C#
49 lines
2.2 KiB
C#
using DocumentService.Client.Interfaces;
|
|
using DocumentService.Client.Models.Requests;
|
|
using Microsoft.Extensions.Logging;
|
|
using System.Net.Http;
|
|
|
|
namespace DocumentService.Client.Clients;
|
|
|
|
/// <summary>
|
|
/// Implementation of PDF conversion client (PDF ? PDF/A).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// All methods throw <see cref="NotImplementedException"/> because the corresponding
|
|
/// API endpoints are not yet implemented on the server side.
|
|
/// </remarks>
|
|
public class PdfConversionClient(HttpClient httpClient, ILogger<PdfConversionClient> logger) : BaseDocumentClient(httpClient, logger), IPdfConversionClient
|
|
{
|
|
/// <inheritdoc />
|
|
[Obsolete("API endpoint not implemented yet")]
|
|
public Task<Stream> ConvertToPdfAAsync(Stream pdfStream, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default)
|
|
{
|
|
Logger.LogWarning("ConvertToPdfA endpoint is not implemented yet in API");
|
|
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/to-pdfa is not implemented yet");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[Obsolete("API endpoint not implemented yet")]
|
|
public Task<Stream> ConvertToPdfAAsync(byte[] pdfBytes, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default)
|
|
{
|
|
Logger.LogWarning("ConvertToPdfA endpoint is not implemented yet in API");
|
|
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/to-pdfa is not implemented yet");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[Obsolete("API endpoint not implemented yet")]
|
|
public Task<Stream> ConvertFromPdfAAsync(Stream pdfStream, CancellationToken cancellationToken = default)
|
|
{
|
|
Logger.LogWarning("ConvertFromPdfA endpoint is not implemented yet in API");
|
|
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/from-pdfa is not implemented yet");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[Obsolete("API endpoint not implemented yet")]
|
|
public Task<Stream> ConvertFromPdfAAsync(byte[] pdfBytes, CancellationToken cancellationToken = default)
|
|
{
|
|
Logger.LogWarning("ConvertFromPdfA endpoint is not implemented yet in API");
|
|
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/from-pdfa is not implemented yet");
|
|
}
|
|
}
|