I have the following code in a page. When it hits the first line an try's to execute it the app locks right up. I have breakpointed and as soon as you f10 the line it never comes back.
protected void ExportList()
{
RadFixedDocument document = new RadFixedDocument();
RadFixedPage page = document.Pages.AddPage();
FixedContentEditor editor = new FixedContentEditor(page);
editor.DrawText("Hello RadPdfProcessing!");
PdfFormatProvider provider = new PdfFormatProvider();
using (Stream output = File.OpenWrite("SPOTDemo.pdf"))
{
provider.Export(document, output);
}
}
5 Answers, 1 is accepted
Hello David,
I created a sample Blazor WebAssembly app using the provided code snippet in order to test the described behavior and on my side, it works as expected.
Please, check the attached project and feel free to modify it in order to help us to reproduce the described behavior.
Regards,
Martin
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Kezi,
I checked the method name in the provided sample project and it is declared as "saveFile" (not "saveAsFile") which could lead to this exception. You can check in the FileDownloader.cs and fileDownloader.js files.
If this is not fixing the described behavior, I would like to ask you to send us a sample project that reproduces the exception in order to deeper investigate the case.
So I now have it setup like you injecting the filegenerator and it still locks up on the first line:
RadFixedDocument document = new RadFixedDocument();
It just goes away and never comes back.
Hello David,
In order to use the Telerik Document Processing Libraries in a Blazor environment, you will need to install the Document Processing`s .NET Standard NuGet packages. They don't include 'Windows' in their names (e.g. Telerik.Documents.Core). For more information check the Cross-Platform Support article.
What I could suggest is to remove all the packages installed, clean your project and install the correct one.
As a side note, I would like to suggest unticking all the package sources in the NuGet Manager (if any) except the https://nuget.telerik.com/nuget in order to be sure the packages are installed from the right NuGet server:
More information can be found in the NuGet Packages help article.
Regards,
Martin
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
this is the error message we get when trying to install the telerik.documents.fixed non trial version:
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Telerik.Zip. Install/reference Telerik.Zip 2021.2.507 directly to project SpotDemo.Client to resolve this issue.
SpotDemo.Client -> Telerik.UI.for.Blazor 2.24.0 -> Telerik.Documents.SpreadsheetStreaming 2021.2.507 -> Telerik.Zip (= 2021.2.507)
SpotDemo.Client -> Telerik.Documents.Fixed 2020.3.1019 -> Telerik.Zip (= 2020.3.1019). SpotDemo.Client C:\Projects\VSWorkspace\SPOT_ES_AGILE_DEVTEAM\SPOTES_ARCHDEMOS\BlazerDemo\Client\SpotDemo.Client.csprojj
Hi David,
From the provided additional information it seems that the version of the Telerik.Zip assembly from the Telerik.UI.for.Blazor package is different than the version of the Telerik.Documents.Fixed assembly, which seems to cause the problem.
You will need to use the same version for all the Document Processing Libraries assemblies, so I could suggest installing the Telerik.Documents.Fixed version 2021.2.507 with the Telerik.UI.for.Blazor 2.24.0.
Regards,
Martin
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.