Rtf2Pdf Object

[Top]  [Chapter]  [Previous]  [Next]

wRTF2PDF by WPCubed GmbH is a universal tool to convert RTF files into PDF. It supports embedded images, tables, headers and footers, sections, embedded images, even textboxes and foot notes.

 

The powerful API makes it easy to

 

- load text (RTF, ANSI, HTML, UNICODE and MIME)

- process text, create tables, insert text and do mail merge

- generate text (PDF, RTF, ANSI, HTML, UNICODE and MIME)

 

The object RTF2PDF is located in the assembly wPDF.dll. You need the RTF2PDF license to be able to use, the object will not work with wPDFControl.

 

When using RTF2PDF V3.5 or later we recommend to only use the property PDFCreator to change the way the PDF file is created. The "old" properties will still work though. Please also do not change the Command() function anymore to work with the text. Now you have a powerful API to create, load and save text. It is possible to load text in RTF, HTML, the proprietary WPT, ANSI and UNICODE format.

 

RTF2PDF can be easily used with ASP or ASP.NET to create HTML or PDF response output. Please check out our demo server.  Since the API is so similar to the API of TextDynamic you can use almost the same code in your ASP page as you used for your desktop application. Due to its nature, it does not offer any GUI elements and does not implement the wpa actions used by TextDynamic.

 

Note: Instead of the interface IWPMemo which is implemented by TextDynamic, RTF2PDF implements the interface IWPEditor. It contains a subset of the IWPMemo methods and properties. Please note that RTF2PDF does not print text.

 

Unless you use the demo, you will need to use

 

  public bool SetLicense(string Name, string Code, uint Number);

 

to tell the engine your license data.

 

You need to use a key which looks like wwww-xxxx-yyyy-zzzz.

The old code/name combination will not work for RTF2PDF 3.x "Plus"

 

When using ASP it is useful to load the license from a file

 

SetLicense("@FILE@securepw", "c:\\keyfile.aspx", 0)

 

The key file can be created with the demo application: start_keyed

 

keyfile

 

Please make sure this file and password is secured.

 

 

Methods

Properties

BeginDoc - start a PDF document

Memo - provides an IWPEditor interface with many sub properties and -methods

EndDoc - closes a PDF document

Memo2

Print - exports the text in editor #1

PDFCreator - modify the PDF properties

PrintSecond - exports the text in editor #2

ResultBuffer - read the created PDF data as array of bytes.

PDFFile in PDFCreator must be set to "memory"

Also see the TranferHelper class.

StartEngine - set license key and initialize

Report (reserved)

StopEngine - stops engine

AttrHelper - can be used to calculate a character attribute index to be used with TextCursor.InputString

 

 

Main interface for RTF2PDF to manipulate text in editor #1 or #2:

IWPEditor/IWPMemo

 

Text creation and cursor positioning:

IWPTextCursor

 

Other Interfaces:

IWPAttrInterface

Update text attributes

IWPCharacterAttr

Attributes for links and fields

IWPDataBlock

Manage header and footer and text layers

IWPFieldContents

Work with mail merge fields

IWPMapi

Interface to create and send e-mails

IWPMeasurePageParam

This interface is used by the OnMeasurePage event.

IWPNumberStyle

Interface to modify a numbering style.

IWPPageSize

Interface to update Pagesize

IWPPageSizeList

Use this list to create set of rectangles and fill them with text

IWPParInterface

Low level paragraph text and attribute access

IWPPdfCreator

Interface to start and configure PDF creation

IWPPicture

.NET Image2Picture utility class

IWPPrintParameter

Optimize printing (duplex, tray selection)

IWPStream

.NET Stream2WPStream utility class

IWPTextObj

Change field, object and image properties

IWPTextWriter

Access writing properties

 


[rtf2pdf.htm]    Copyright © 2007 by WPCubed GmbH