Report Generator by raw pdf object for .net project

6 ビュー (過去 30 日間)
Dharmesh Joshi
Dharmesh Joshi 2023 年 5 月 15 日
コメント済み: Dharmesh Joshi 2023 年 5 月 16 日
Hi
I need some advice in regards to useing report genertor in a .net application, via creating a dll file from the coder app.
I am following the example outlined below, but creating a pdf instead of a html.
The aim is to have the report generoted in my .net AzureFunction App.
But if was to crete a dll using the coder genertor app, where would the pdf gets saved, therefore i am thinking is it possible for the report genertor to simple output a pdf based object (raw data). Then using the raw data outputed from the dll file i could save it as .pdf locally on any platform that is accessing my .net project.
Is this possible?
Thanks

回答 (1 件)

Shaik
Shaik 2023 年 5 月 16 日
Hi Joshi,
Yes, it is possible to generate a PDF using the Report Generator and save it locally in your .NET application. Instead of directly saving the PDF file within the DLL generated by the code generator, you can modify your approach to return the PDF data as a raw object from the DLL. This allows you to handle the PDF data in your .NET application and save it locally as needed.
Here's a general outline of the approach you can follow:
  1. Generate the PDF using the Report Generator: Use the code generator app to create a DLL that generates the PDF report. Ensure that the DLL returns the PDF data as a raw object, such as a byte array or a memory stream, instead of directly saving it to a file.
  2. Integrate the DLL into your .NET application: Import the DLL into your .NET application and invoke the appropriate methods to generate the PDF. Capture the PDF data returned by the DLL into a variable within your .NET application.
  3. Save the PDF locally: Once you have the PDF data in your .NET application, you can save it locally using the System.IO.File class. Specify the file path and use the WriteAllBytes or WriteAllBytesAsync method to save the PDF data to the desired location on the local file system.
  1 件のコメント
Dharmesh Joshi
Dharmesh Joshi 2023 年 5 月 16 日
Thank You for your reply
Have you tried this before?
So from Matlab, how do you output the raw object instead of the PDF file?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDeploy to .NET Applications Using MWArray API についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by