Print Page | Close Window

Rich Text Handling

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1263
Printed Date: 15 Aug 25 at 4:00AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Rich Text Handling
Posted By: MrPopup
Subject: Rich Text Handling
Date Posted: 02 Nov 09 at 12:21AM

Is there any way to use rich text in a QuickPDF generated document?

 

The scenario is that we have an application where the user enters a heap of text into a windows RTF control.  They do a limited amount of formatting: bullets, font size & colour being about it.

 

How do we then ‘print’ that text, via QuickPDF including the format details etc?

 

Thank you for any/all assistance. Wink 




Replies:
Posted By: Ingo
Date Posted: 02 Nov 09 at 6:54AM
Hi!

Many years ago as i want to understand the rtf-format i began to produce my first rtf-samples with notepad 'cause the basically rtf-format-syntax is directly readable.

In QuickPDF there are the html-tags you can use. What you can do now is to see what rtf-format-syntax you will have and if there are similar supported html-tags from QuickPDF. Finally you have to build a mapping table rtf/html to convert your rtf-text and the last step can be the pdf-convertion.

There isn't a ready made solution in QuickPDF but it should be possible that you can do it with QuickPDF ;-)

Cheers, Ingo



Posted By: DELBEKE
Date Posted: 02 Nov 09 at 7:07AM
I have not tested it by myself, but with the last revision, there should be a new way using GetCanvasDc and LoadFromCanvasDc.
The GetCanvsDc return a virtual Device Context . You can use it the same way than a printer or a display device context. If you now how to render a rtf on a printer, then use the same code to render on the pdf.


Posted By: DELBEKE
Date Posted: 05 Nov 09 at 10:44AM
Hi MrPopUp.
 
I have posted a sample writen in vb6 that make the job in the sample section.
http://www.quickpdf.org/forum/convert-rtf-to-pdf_topic1266.html - http://www.quickpdf.org/forum/convert-rtf-to-pdf_topic1266.html



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk