Hi!
I make a PDF from report:
Stimulsoft.Report.Export.StiPdfExportSettings exportsettings = new();
exportsettings.AutoPrintMode = Stimulsoft.Report.Export.StiPdfAutoPrintMode.Silent;
StiReport report = new StiReport();
. . .
report.Render(true);
StiReportResponse.PrintAsPdf(report);
PDF is OK in browser window.
When I download it clicked on Download icon: "Network error".
Should I set anything? Or what is the solution?
Thank you
Attila
Blazor - Download PDF - error
Re: Blazor - Download PDF - error
Sorry!
This problem is only in Chrome, but in FireFox it's working.
Attila
This problem is only in Chrome, but in FireFox it's working.
Attila
-
- Posts: 808
- Joined: Tue Sep 07, 2021 10:11 am
Re: Blazor - Download PDF - error
Hello,
Please check the the following link with our Blazor samples:
https://github.com/stimulsoft/Samples-R ... rom%20Code
Thank you,
Please check the the following link with our Blazor samples:
https://github.com/stimulsoft/Samples-R ... rom%20Code
Thank you,
Re: Blazor - Download PDF - error
Hi!
Thank you for your answer.
I see the sample - it's ok.
But I always must print the pdf in a new browser window: StiReportResponse.PrintAsPdf(report)
1. Then If the user wants to, he clicks on the browser's Download icon and download it.
This works fine in Firefox, but not in Chrome. Why?
2. Or the program print and download pdf all at once.
3. Or the program download it first (StiReportResponse.ResponseAsPdf(report)), then open it immediately.
I try 3. without automatic open (I can't do that). This is faster then print to pdf.
By the way, I use JS for the new window opening:
string url = $"/documentprint..." - this razor generates the report
await jsRuntime.InvokeVoidAsync("open", url, "_blank");
Attila
Thank you for your answer.
I see the sample - it's ok.
But I always must print the pdf in a new browser window: StiReportResponse.PrintAsPdf(report)
1. Then If the user wants to, he clicks on the browser's Download icon and download it.
This works fine in Firefox, but not in Chrome. Why?
2. Or the program print and download pdf all at once.
3. Or the program download it first (StiReportResponse.ResponseAsPdf(report)), then open it immediately.
I try 3. without automatic open (I can't do that). This is faster then print to pdf.
By the way, I use JS for the new window opening:
string url = $"/documentprint..." - this razor generates the report
await jsRuntime.InvokeVoidAsync("open", url, "_blank");
Attila
-
- Posts: 808
- Joined: Tue Sep 07, 2021 10:11 am
Re: Blazor - Download PDF - error
Hello,
Please send us a sample project that reprduce the issue.
Thank you.
Please send us a sample project that reprduce the issue.
Thank you.