adobe / adobe/PDFServices.NET.SDK.Samples
I am sending a stream from an IFormFile, but I am getting the following error
- 主要语言
- HTML
- 星标
- 47
- 派生
- 23
- PR 合并指标
- 30 天内没有已合并 PR
描述
### 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
贡献指南
调研方向
从提供的示例代码路径 FileRef.CreateFromStream 和 DocumentMergeOperation.Execute 开始,然后将其与 .NET 7 示例应用程序对 IFormFile 流的处理进行比较。首先记录完整的错误和完整的复现步骤;在复现故障并确定有文档记录的修正方案或已确认的 SDK 问题后,才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 24/100