[AccessD] OT: Writing raw RTF document using VB/VBA/C(++)/DEL PHI/...

Gustav Brock gustav at cactus.dk
Sat May 24 08:03:47 CDT 2003


Hi Shamil

I once located these links to a compact list of codes (not sure of the
version) and some simple code examples:

  http://thorkildsen.no/faqsys/docs/rtf.txt

  http://www.codeguru.com/forum/showthread.php?threadid=233068


My simple need (which I never got solved) was how to assemble an
rtf-formatted field from many records (essentially each an rtf
document) into one rtf document, stripping headers etc. from each
record and adding a header etc. to the final document.

So if you come up with a routine for parsing an rtf string, at least
extracting the content including bold, underline, and italic
attributes, I would be pleased to see it.

Here's a link to a class in RealBasic for parsing a subset of rtf
formatted text. I guess you can download a trial version of RealBasic
to study it:

  http://www.belle-nuit.com/realbasic/rtfparser.html

In Java life is easier:

  http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/text/rtf/RTFEditorKit.html

/gustav


> Bryan's link points to v1.6 of the RTF spec.  But, if you're interested, I
> was poking around and found a download link (watch for wrap) for v1.7.

http://www.microsoft.com/downloads/details.aspx?FamilyId=E5B8EBC2-6AD6-49F0-8C90-E4F763E3F04F&displaylang=en

> Mark


> RTF Files are just plain old ascii text. So Low level File I/O will work to
> write it.

> The biggest challenge would be to get the text string correct before writing
> them out to the file.

> Here is a link to the RTF spec.

http://msdn.microsoft.com/library/?url=/library/en-us/dnrtfspec/html/rtfspec.asp?frame=true

> As for PDF, here is the link to the PDF Specs.

http://partners.adobe.com/asn/acrobat/docs.jsp#filefmtspecs

> Bryan Carbonnell
> bryan_carbonnell at cbc.ca



More information about the AccessD mailing list