Timeout on ExportAnnotationAsStreamAsync
Hi,
I use SfPdfViewer2 with Blazor wasm client 31.2.12 and .NET8
When I run an export annotation after inserting text, the action
Stream stream = await ViewerPdf.ExportAnnotationAsStreamAsync();
times out.
If I insert a shape, everything works correctly.
Attachment: PdfViewerTimeout_2c74923.png
Hi Giuseppe Bellini,
Thank you for the
update. We have tested the reported scenario using the Blazor WASM template in
version 31.2.12, and exported/imported the FreeText annotation as a stream
using the ExportAnnotationAsStreamAsync
and ImportAnnotationAsync
APIs. However, we were unable to reproduce the reported issue on our side.
Please review the attached sample and demo video for reference. Kindly modify the sample to replicate the issue you are facing. If the problem is document-specific or annotation-specific, please share those files so we can reproduce the issue and provide an accurate solution.
Additionally, could you confirm whether you have added SkiaSharp.Views.Blazor (version 3.116.1) to your project? This version is compatible with the latest Blazor PDF Viewer. If not, please add it and check if the issue persists.
Getting started for Blazor WASM PDF Viewer
Sample
we have tested
Issue
not reproduced demo
Regards,
I ran the attached example, but it doesn't work.
Add log on export as image
1. Enable annotation
2. Add text
3. Click export
No log is displayed on the stream when clicking
public async Task OnExportAsStreamJson(MouseEventArgs args)
{
if(Viewer != null)
{
Console.WriteLine("OnExportAsStreamJson");
annotationStreamJson = await Viewer.ExportAnnotationAsStreamAsync(AnnotationDataFormat.Json);
if (annotationStreamJson == null)
Console.WriteLine($"OnExportAsStreamJson stream lenght: empty");
else
Console.WriteLine($"OnExportAsStreamJson stream lenght: {annotationStreamJson.Length}");
}
}
Hi Giuseppe Bellini,
Thank you for the update. We have verified this using the same code you shared and tested it with the same version (31.2.12). However, the reported issue is not reproducible on our end.
We have attached the sample project that we tested, along with a video demonstrating the testing scenario.
Could you please try clearing the browser cache and performing a hard reload by right‑clicking the refresh button on the browser tab and selecting “Empty Cache and Hard Reload”? After that, add the annotation and click Export Annotations.
Additionally, please wait for a short while for this action to complete, as the details will be printed in the browser’s Console tab once the process finishes.
Kindly review the attached sample project, and if the issue still persists on your side, please share a video demonstrating the issue reproduction.
Regards,
Venkada Subramanian D
Attachment: Sample_project_and_video_we_have_tested_73418d25.zip
I tried the exact same project with VS 2022 and the latest Chrome update.
It doesn't work; it doesn't load the stream, and it does the same in production.
If I add a rectangle without text, it works fine.
Can you help me?
Attachment: Sync2_50142c52.png
I posted your example as you sent it and it doesn't even work.
I posted your example as you sent it and it doesn't even work.
Hi Giuseppe Bellini,
Thank you for the details. The reported issue can be occurred with the provided sample project only when the .NET workload for .NET 8 is not installed on the machine. We recommend verifying whether the wasm-tools-net8 workload is installed if you are using a .NET 8 project.
You can check this by running the following command in the Command Prompt:
dotnet workload list
In the output, look for wasm-tools-net8.
If it is missing, please install it using:
dotnet workload install wasm-tools-net8
This will install the required workload for .NET 8. Additionally, you can detect missing workloads during the build process by adding the following line inside the project’s <PropertyGroup>:
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<WasmBuildNative>true</WasmBuildNative>
</PropertyGroup>
If the workload is already installed, we suggest restoring the workloads once by running the following command from the project folder:
dotnet workload restore
We have also documented the requirement to install the necessary workloads in the user guide.
Kindly check whether the issue is resolved after installing the workload. If you still face any problems, please let us know.
UG documentation for Prerequisites for Blazor WASM PDF Viewer
Venkada Subramanian D
On my PC, I ran "dotnet workload list" and NET8 and NET9 were installed.
But I deployed to Azure: https://bludrive-uat-test.azurewebsites.net/ and it doesn't work there either, and I tried both from Chrome and Edge. Again, only the text export doesn't work; everything else works.
Hi Giuseppe Bellini,
Thank you for the update. If the .NET 8 workloads are already installed on your local machine, could you please confirm this by restoring the existing workloads using the following command from the project folder and share your feedback?
dotnet workload restore
Additionally, please confirm whether you are encountering the issue on your local environment as well, or if it is reproducible only in the production environment.
Also, kindly confirm whether you are using the same project that we have attached, without making any manual changes to the package versions.
Project file with compatible Syncfusion versions:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.20" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.20" PrivateAssets="all" />
<PackageReference Include="SkiaSharp.Views.Blazor" Version="3.116.1" />
<PackageReference Include="Syncfusion.Blazor.SfPdfViewer" Version="31.2.12" />
<PackageReference Include="Syncfusion.Blazor.Themes" Version="31.2.12" />
</ItemGroup>
</Project>
Finally, please share the production environment configuration details so that we can set up the same environment, host the application, and test it accordingly to share our findings.
Regards,
Venkada Subramanian D
Attachment: WASMNet8_a9cf79a2.zip
As already mentioned several times, I opened your project without modifying it. And I'm having the same problem both locally and in production. I swear I didn't change anything; why would I?
But can you check the production client I published? You should be able to see the problem from there.
I recently installed VS2026 with NET10.
dotnet workload list: 10.0.200-manifests.121cc9e6
ID carico di lavoro installato Versioni del manifesto Origine dell'installazione
--------------------------------------------------------------------------------------------------
android 36.1.30/10.0.100 VS 17.14.36717.8
ios 26.2.10217/10.0.100 VS 17.14.36717.8
maccatalyst 26.2.10217/10.0.100 VS 17.14.36717.8
maui-windows 10.0.20/10.0.100 VS 17.14.36717.8
wasm-tools 10.0.105/10.0.100 VS 17.14.36717.8, VS 18.4.11626.88
wasm-tools-net6 10.0.105/10.0.100 VS 18.4.11626.88
wasm-tools-net7 10.0.105/10.0.100 VS 18.4.11626.88
wasm-tools-net8 10.0.105/10.0.100 VS 18.4.11626.88
wasm-tools-net9 10.0.105/10.0.100 VS 18.4.11626.88
Hi Giuseppe Bellini,
Thank you for the details. Although the .NET 8 workloads are already installed on your machine, we recommend reinstalling them manually using the command below. This process will reinstall any missing or corrupted dependencies, if present.
dotnet workload install wasm-tools-net8
After reinstalling the workloads, please clean the bin and obj folders of the project, clear the browser cache, and then rerun the project. This approach resolves the issue in most cases.
Additionally, since you have installed the WASM workloads for .NET 10 across two different Visual Studio versions (17.14.36717.8 and 18.4.11626.88), we suggest reviewing the attached .NET 10 sample project and sharing your feedback. This will help us diagnose the specific issue you are encountering with the workload installation.
If the issue persists, please share the detailed information, and we will assist you further based on the provided details.
Regards,
Venkada Subramanian D
Attachment: WASMNet10_89dc2f07.zip
1 Version NET10 with VS 2026 that use 10.0.201 is OK
2 Version NET8 with VS2022 that use 8.0.201 is KO
3 dotnet workload install wasm-tools 8.0.201 reinstalled OK
4 Open Version8 With VS2022 that use 8.0.201 is KO
5 Open Version8 With VS2026 and use 8.0.201 with globa.json setti is KO
Hi Giuseppe Bellini,
Thank you for the detailed update. Based on the investigation so far, our understanding is as follows:
- .NET 10 (SDK 10.0.201) works correctly with WASM in Visual Studio 2026.
- .NET 8 (SDK 8.0.201) fails in both Visual Studio 2022 and Visual Studio 2026.
- Reinstalling the wasm-tools workload completes successfully but does not resolve the issue.
- The behavior remains unchanged even when SDK 8.0.201 is pinned using global.json.
These findings strongly suggest that the issue is isolated to the .NET 8.0.201 SDK or its WASM toolchain, rather than being specific to the PDF Viewer implementation.
To proceed further, could you please confirm whether the issue reproduces when using the latest available .NET 8 SDK?
Additionally, to ensure the workload state is fully clean and consistent, please perform the following steps from an elevated command prompt:
- Clear existing workloads
dotnet workload clean - Repair the workload installation This helps resolve any broken or inconsistent workload manifests:
dotnet workload repair - Force reinstall the WASM tools for .NET 8 Even if the workload appears to be installed, please run:
dotnet workload install wasm-tools-net8
Please let us know the results after completing these steps. This information will help us identify and isolate the specific issue related to the .NET 8 WASM workload loading behavior.
Regards,
Venkada Subramanian D
- 14 Replies
- 3 Participants
-
GB Giuseppe Bellini
- Nov 21, 2025 11:09 AM UTC
- Apr 22, 2026 11:01 AM UTC