adobe / adobe/PDFServices.NET.SDK.Samples
I am sending a stream from an IFormFile, but I am getting the following error
- Lenguaje dominante
- HTML
- Estrellas
- 47
- Forks
- 23
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
### Expected Behaviour
Generate PDF from docx in IFormFile
### Actual Behaviour
Error:
### Reproduce Scenario (including but not limited to)
#### Steps to Reproduce
#### Platform and Version
.NET 7 in macOS 13.5 with Apple Sillicon
#### Sample Code that illustrates the problem
```
// Initial setup, create credentials instance.
Credentials credentials = Credentials.ServicePrincipalCredentialsBuilder()
.WithClientId("")
.WithClientSecret("")
.Build();
ExecutionContext executionContext = ExecutionContext.Create(credentials);
DocumentMergeOptions documentMergeOptions = new DocumentMergeOptions(jsonObject, OutputFormat.PDF);
DocumentMergeOperation documentMergeOperation = DocumentMergeOperation.CreateNew(documentMergeOptions);
using var stream = new MemoryStream();
await file.CopyToAsync(stream);
FileRef source = FileRef.CreateFromStream(stream, CreatePDFOperation.SupportedSourceFormat.DOCX.GetMediaType());
documentMergeOperation.SetInput(source);
FileRef result = documentMergeOperation.Execute(executionContext);
await using Stream outputStream = PrepareOutputStream();
result.SaveAs(outputStream);
_logger.LogInfo("Moving this temporary file to output stream.");
```
#### Logs taken while reproducing problem
Guía de contribución
Línea de trabajo
Comience con la ruta del código de ejemplo proporcionado en FileRef.CreateFromStream y DocumentMergeOperation.Execute, y compárela después con el manejo del flujo IFormFile por parte de la aplicación de ejemplo de .NET 7. Capture primero el error completo y los pasos completos para reproducirlo; se considera terminado cuando se reproduce el fallo y se identifica una corrección documentada o un problema confirmado del SDK.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 24/100