adobe / adobe/PDFServices.NET.SDK.Samples
I am sending a stream from an IFormFile, but I am getting the following error
- Ngôn ngữ chính
- HTML
- Star
- 47
- Fork
- 23
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với đường dẫn mã mẫu được cung cấp tại FileRef.CreateFromStream và DocumentMergeOperation.Execute, sau đó so sánh với cách ứng dụng mẫu .NET 7 xử lý luồng IFormFile. Trước tiên, hãy ghi lại đầy đủ lỗi và các bước tái hiện hoàn chỉnh; được xem là hoàn tất khi tái hiện được lỗi và xác định được bản sửa lỗi đã được tài liệu hóa hoặc một vấn đề SDK đã được xác nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 24/100