Unlock the Power of Direct PDF Editing with WebViewer 10.7

Dynamic Document Generation With the Fluent .NET Engine

By Ian Peterson | 2023 Jul 25

Sanity Image
Read time

3 min

Creating dynamic and personalized documents is critical for modern digitally-driven businesses across various industries. Fortunately, Apryse offers the Fluent .NET Engine to simplify this process. This is a powerful document generation solution that empowers .NET developers to automate the creation of sophisticated documents effortlessly. In the following article, we will explain the benefits of the Fluent .NET Engine and demonstrate how it enables you to enhance your .NET development workflow and revolutionize the generation of dynamic documents.

Introducing the Fluent .NET Engine: A Developer's Dream

Copied to clipboard

The Fluent .NET Engine provides a robust and flexible framework for programmatically automating the generation of documents. Its key features include:

  • .NET-based API: Using a developer-friendly API, you can seamlessly integrate Fluent’s document generation capabilities into your .NET applications.
  • Template-driven approach: Use the familiar Microsoft Office environment to design dynamic document templates, making it easy to create and modify your templates.
  • Data binding: Bind data from a variety of sources, such as databases or web services, to the document template to enable dynamic content generation.
  • Extensive formatting options: Customize the look and feel of your documents with advanced formatting options, including fonts, colors, tables, and images.
  • Conditional logic: Enable complex document generation scenarios by incorporating conditional statements, loops, and calculations into your templates. 

Quote

Unlock the power of document generation with our SDK. Simplify document assembly, enhance efficiency, and streamline your processes. Get started today!

Streamlined Document Generation Process

Copied to clipboard

Document generation with the Fluent .NET Engine involves the following steps:

Step 1: Set up the template: Start by using the Fluent Designer add-in for Microsoft Office Word, Excel, or PowerPoint to create or modify a document template.

Step 2: Bind data: By mapping data fields to the appropriate placeholders in the template, you connect your data sources to the Fluent .NET engine. This enables data to be automatically populated data during document generation.

Step 3: Generate the document: Call the Fluent .NET Engine's API to process the template and data to generate the final document output. The engine dynamically replaces placeholders with the provided data, resulting in personalized and accurate documents. The output can be seamlessly generated in a wide range of formats, such as DOCX, PDF, HTML, and many others.

Example:

// Initialize the engine 
Report.Init(); 

// Open template file and create output file 
FileStream template = File.OpenRead("../../../Samples/Windward Trucking 2 - Template.docx"); 
FileStream output = File.Create("../../../Samples/Xml Report.pdf"); 

// Create report process 
Report myReport = new ReportPdf(template, output); 

// Open a data object to connect to our xml file 
string url = Path.GetFullPath("../../../Samples/Windward Trucking 2 - Data.xml"); 
string xsd = null; 
IReportDataSource data = new SaxonDataSourceImpl(string.Format("Url={0}", url), xsd); 

// Run the report process 
myReport.ProcessSetup(); 
// The second parameter is "sax" to tell the process that our data is for the datasource named "sax" 
myReport.ProcessData(data, "sax"); 
myReport.ProcessComplete(); 

// Close out of our template file and output 
data.Close(); 
output.Close(); 
template.Close(); 

For a more comprehensive look at document generation with Fluent, check out this getting started guide on our Fluent Docs site.

To learn how document generation technology benefits the healthcare industry, check out our blog.

Benefits of Using the Fluent .NET Engine

Copied to clipboard

By utilizing the Fluent .NET Engine in your .NET development workflow, you can unlock several advantages:

  • Increased productivity: With a streamlined document generation process and a developer-centric API, you can generate documents efficiently. This saves valuable development time.
  • Dynamic and personalized content: Seamlessly merge data from multiple sources into your document templates to create personalized and relevant content in high volume.
  • Consistency and brand compliance: Ensure brand consistency across all generated documents by using standardized templates to maintain a professional and polished look and feel.
  • Agile document updates: Modify document templates on-the-fly, without redeploying your application. This ensures flexibility and agility in response to changing business needs.
  • Integration capabilities: Easily integrate the Fluent .NET Engine with existing .NET applications, frameworks, and libraries, maximizing compatibility and minimizing development effort.

The Fluent .NET Engine enables.NET developers to simplify the process of document generation, saving time and effort while maintaining the flexibility to create dynamic and personalized documents. With Fluent .NET Engine's intuitive API, template-driven approach, and seamless data integration capabilities, it revolutionizes document generation in .NET applications. You can generate dynamic document in Java as well. Discover how the Fluent Java Engine transforms document generation and elevates your Java development process.

Next Steps

Copied to clipboard

To experience the power of the Fluent .NET Engine, integrate it into your .NET projects and see how it can optimize your document generation workflows. Unleash the potential of dynamic and personalized document generation with Apryse’s Fluent .NET Engine.

Contact us today to learn more about the Fluent .NET Engine and how it revolutionizes document generation capabilities in .NET applications, or sign up for a free trial to see it for yourself.

Sanity Image

Ian Peterson

Software Engineer

Share this post

email
linkedIn
twitter