In Coldfusion, some Arabic characters not displaying in PDF - coldfusion

Some of the Arabic characters are not displaying in PDF.
Do I need to add any font in ColdFusion Administrator
I gave المينــاء as input inside the tag CFDOCUMENT to show in PDF format.
In PDF, the output I am getting is اينــاء instead of المينــاء.
Please advice.
Thanks in advance.

You can use fontembed attribute of cfdocument and set it to true to embed the specified fonts in the output. You need to wrap your text inside span and specify the suitable font-family (font-family that displays your text better as required) in its style attribute. As #bibin suggested use Arial Unicode MS as the font-family.
Like this:
<cfdocument format="PDF" overwrite="true" fontembed="true">
<span style="font-size:20pt;font-family:Arial Unicode MS;">
المينــاء
</span>
</cfdocument>
Another font-family able to display the text is Traditional Arabic.
You can install other more accurate font in CF Admin if you find one, and use it as a font family.
Update:
In my case the font is already available in CF Admin. So here fontEmbed is not really needed. It is helpful in case the font is not available in CF Admin and we want to use the font directly from CF page.

got to c:/ drive >> windows folder >> fonts
check sure arial unicode ms is there if not there please add arial unicode ms.ttf
and inside CFML/HTML code please use like this style="font-family:arial unicode ms بيالتلان

Related

Text compare with pdf export

I want to be able to export a text compare to PDF.
Until now I tried: Notepad++, Tortoise Git/SVN, Winmerge and Diffchecker desktop.
Only Winmerge and Diffchecker desktop are able to do it, but since you cannot adjust scaling for printing there the text is cut off in the export.
Winmerge has both font & zoom plus page size settings to get a good PDF customized output.

Sitecore Rich Text Editor Links

I have this weird problem in Sitecore 7.0 where within the Rich Text Editor the internal links look like below
<a href="http://xys.com/sitecore/shell/Controls/Rich%20Text%20Editor/~/link.aspx?_id=594621DB37464C17B6EFB0C6B8399415&_z=z">
where the correct href should be
<a href="~/link.aspx?_id=594621DB37464C17B6EFB0C6B8399415&_z=z">
My editors don't know if they did something special for the link to be messed up like that, it is not across all the links. It does make me think that it is human error but I can't think how they could end up with such a URL?
Any help is appreciated.
Can you check the HTML Editor Profile that you are using (core database) /sitecore/system/Settings/Html Editor Profiles and make sure that the Insert Sitecore Link is the same as the default one? You should have "InsertSitecoreLink" on the Click field

How to Specify fonts for Text fields using muPDF

I am using muPDF library to add fields in existing PDF Documents.
I have successfully added a checkbox by defining its appearance.
But Text Fields are a problem as they need a Font Resource.
I cant figure out how to add fonts in a PDF document.
muPDF does have functions that deal with fonts, but I am unable to use them in a proper manner.
So i need to know how to load a font in a PDF document and how to reference them to my Text Field in the default appearance(DA).
----------------------------------------------------------EDIT------------------------------------------------------------------
Currently I am using the function pdf_set_free_text_details in pdf-annot-edit.c
But it only sets the predefined fonts . i wish to use other fonts as well
If this is not the right place to ask this question, then please if somebody could redirect me to the correct place. MuPDF only has a bug report site as far as i know.
Pass any of the font types specified on pdf-font.c as a string.
For eg: "Courier", "CourierNew", etc..

Customized Rich Text Editor in Sitecore to generate BBCode tags instead of HTML

I am currently creating a mobile site using Sitecore, where I cannot use HTML as markup instead need to use BML as markup language for mobile. Please let me know the following in this regard:
We have a field called Description and its of type RICH TEXT. Here we cannot use the normal Rich Text Editor given by the Sitecore as it generates HTML. So can anyone tell me if I can create a customized RICH TEXT Editor with a button Say "Mobile Bold" and which should generate tags for mobile instead of normal HTML <b></b> tags .
As you all know we can change the RICH TEXT Editor from Default to FULL by setting the source attribute of the field to /sitecore/system/Settings/Html Editor Profiles/Rich Text Full. So in the similar way can I create one more item in the Core DB as /sitecore/system/Settings/Html Editor Profiles/MobileRichTextFull and include customized buttons to it so as to generate BML tags as described above. If this is possible let me know what are all the settings need to be done and steps to be followed for the same.
do you want the users to edit BML directly, or are you able to transform HTML to BML?
For the latter, you'd better solve this in the presentation layer/pipeline.
HTML Agility Pack will be your friend when going for this last solution.
Otherwise, look at Teleriks resources about the editor.

Using richtext in QTextEdit

What is exactly richtext and how do I format data in richtext in QTextEdit?
The internal rich text format is tag/attribute-based, and is similar to HTML using in-line CSS style="xxx" attributes. The default export/import format (using toHTML/setHTML) is a subset of HTML. See this link:
http://doc.trolltech.com/4.6/richtext-html-subset.html
Note that CSS classes are not supported internally and are converted to their representing attributes at import.
QTextEdit can display text that is formatted with additional layout and style information (i.e. enriched) which can be set either programatically or by using a subset of HTML.
The Rich Text Processing documentation gives you an overview and pointers to more in-depth information.
If you're looking for a WYSIWYG toolbar for the QTextEdit, you'll end up disappointed. There is no default one (although the SDK contains an example app). So you should either make the toolbar yourself or find one.