Dev Direct Solution Center

For more information and to buy this product...

Dynamic PDF creation - .NET, ASP, ASP.NET and ActiveX

  For a copy of the sample project please click here to download and install the product evaluation.

Introduction

RTF2PDF can be easily used with ASP or ASP.NET to create HTML or PDF response output. A template can be loaded as RTF or HTML code, modified and then saved as RTF, HTML and PDF. It is possible to use merge fields, too. With the 'Reporting' addon it is possible to use meta tags to create bands which will be looped in the template. So it is also possible to create lists and master-client reports. RTF2PDF/TextDynamicServer has been designed to work in the background. We also market TextDynamic - it

Detail

RTF2PDF ASP.NET Example

1) In your ASP.NET C# project please first add a reference to the wPDF3.DLL.

2) In the file module you want to use RTF2PDF add a link to wPDF:

using wPDF;
using WPDynamic;

3) Within the Page_Load event you create and instance of RTF2PDF - at the end don't forget Dispose()!

C#
RTF2PDF wpdllint1 = new RTF2PDF(); try { // insert the following code here } finally { wpdllint1.Dispose(); }

4) Set the license code.

      wpdllint1.SetLicense..., ..., 0);

5) You can use code to load data, or to create text. Here we simply create a table.

           wpdllint1.Memo.Clear(false,false);
wpdllint1.TextCursor.AddTable("",2,30,true,0,true,true);

6) When the document was created you can send it as response either as HTML or as PDF.

as HTML:

           Response.Write( wpdllint1.Memo.SaveToString(false, "HTML") );

as PDF:

      // Create PDF in memory
      wpdllint1.PdfCreator.PDFFile = "memory";
      wpdllint1.PdfCreator.FontMode = 0;
      wpdllint1.Memo.ReformatAll(false,false);
      wpdllint1.Print();
      // Set ASP result
      Response.Clear();
      Response.ContentType = "application/pdf";
      Response.AddHeader("Content-Type", "application/pdf");
      Response.AddHeader("Content-Disposition","inline;filename=PortableDocument.pdf");
      Response.BinaryWrite(wpdllint1.ResultBuffer);
More ...

But RTF2PDF can do much more - please see the online documentation.

Regards,
Julian Ziersch
WPCubed GmbH

Visit WPCubed GmbH for more information and more samples.