adobe / adobe/PDFServices.NET.SDK.Samples
I am sending a stream from an IFormFile, but I am getting the following error
- Langage dominant
- HTML
- Étoiles
- 47
- Forks
- 23
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le chemin du code d’exemple fourni au niveau de FileRef.CreateFromStream et DocumentMergeOperation.Execute, puis comparez-le avec la gestion du flux IFormFile par l’application d’exemple .NET 7. Consignez d’abord l’erreur complète et les étapes complètes de reproduction ; le travail est considéré comme terminé lorsque l’échec est reproduit et qu’une correction documentée ou un problème confirmé du SDK est identifié.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp
- Domaine
- backend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 24/100