ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 RichText formatting not exported in PDF
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

84 Posts

Posted - Oct 10 2021 :  13:38:56  Show Profile  Reply
Hi,

(1) creating a RichText layer using:
ImageEnView1.LayersAdd('Double click', 40, clBlack, 'Arial', []);
TIETextLayer(ImageEnView1.CurrentLayer).EnableFormatting := True;

or
ImageEnView1.LayersAdd(ielkText);
TIETextLayer(ImageEnView1.CurrentLayer).RichText := 'Double click';
TIETextLayer(ImageEnView1.CurrentLayer).EnableFormatting := True;

then (2) manually editing the text, first using the enter key to get the two words on two lines and than formatting the text (e.g. color and/or size of the word "click" or text orientation of "Double click") and (3) saving it as PDF using:
ImageEnView1.IO.SaveToFilePDF(PDFFile);

the text in the PDF file is on two lines but doesn't have the formatting changes.



What am I missing?

Al

xequte

6420 Posts

Posted - Oct 10 2021 :  18:15:44  Show Profile  Reply
Hi Al

I'm afraid Rich Text formatting is not supported when exporting to PDF. I will add this to the documentation.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

aleatprog

84 Posts

Posted - Oct 11 2021 :  05:52:08  Show Profile  Reply
The following workaround converts the text layers to images before saving to PDF thus maintaining the RichText formatting.
for i := 0 to ImageEnView1.LayersCount - 1 do
if TIELayer(ImageEnView1.Layers[i]) is TIETextLayer then
ImageEnView1.Layers[i].ConvertToImageLayer(1, True);

Al
Go to Top of Page

xequte

6420 Posts

Posted - Oct 12 2021 :  00:22:48  Show Profile  Reply
Hi Al

Yes, that is a suitable workaround, though note that the text will not be selectable like other text (or available via Find for example).




Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: