Rtf2Pdf Object

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

wRTF2PDF / TextDynamic Server  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. We have added this topic to the TextDynamic manual since it uses almost the same interfaces and code in general is interchangeable. RTF2PDF can be seen as the server edition of TextDynamic.

 

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.

 

RTF2PDF can also be used in VBS, VB and alike: Please see our introduction ActiveX example code!

 

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. Use this to export a report!

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

PDFFile in PDFCreator must be set to "memory"

Also see the TranferHelper class.

StartEngine /SetLicense - set license key and initialize.

Report - used for the optional reporting feature.

StopEngine - stops engine

(OCX, C++ only)

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

 

 

Main interface for TextDynamic 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

IWPEditor

Main interface for RTF2PDF to manipulate text #1 or text #2

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

IWPTextCursor

Text creation and cursor positioning

IWPTextObj

Change field, object and image properties

IWPTextWriter

Access writing properties

 

Not used are yet (reserved for optional reporting edition)

IWPReport

Manage reporting template

IWPReportBand

Manage report bands and groups

IWPReportVar

Manage reporting variables (to sum values)

 

Also see:

wPDFControl Methods and Properties


[rtf2pdf.htm]    Copyright © 2007 by WPCubed GmbH