- 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.
- 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.
- 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.
Report Generator by raw pdf object for .net project
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (1)
Shaik
el 16 de Mayo de 2023
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:
Ver también
Categorías
Más información sobre Deploy to .NET Applications Using MWArray API en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!