CFDocument in fontembed

Last 3 days, I'm about to generate one of our reports to PDF with cfdocument but I don't know why our unicode font is missing as displaying "blank" in cfdocument even this font is in my pc. That's why I request my junior to investigate the problem to be solved. After a day, she found how to display unicode font in cfdocument.

First of all, we need to install font in our server first. Then, we need to go CFAdmin > Font Management and add installed font into coldfusion to be recognized. After all, we need to add fontembed="yes" in cfdocument as follow.

view plain print about
1<cfdocument format="pdf" orientation="portrait" backgroundvisible="true" filename="pdf_#id#.pdf" fontembed="yes" overwrite="true">

Remove MSWord comment in Coldfusion

Today, I've got problem because of messy of Microsoft Word comments in our database. It's because of our clients wrote some messages in MsWord and paste these into CFTextarea richtext data. That's why those data cannot be displayed at our project. It's my bad that I have not thought about how to prevent these kind of problems during project development.

[More]

Integreate Messi jQuery dialog with Coldfusion

If you're getting sick of working with coldfusion built-in dialog? Here is beautiful messi jQuery dialog can integrate with coldfusion.

Include JS and CSS in your CSS first.

view plain print about
1<link rel="stylesheet" type="text/css" href="CSS/messi.css">
2<script type="text/javascript" src="JS/jquery.js"></script>
3<script type="text/javascript" src="JS/messi.js"></script>

[More]

CFTransaction cannot work for different datasource

Today, I've found that CFTransaction cannot work for different datasource. This one is really bad for CFDevelopers like us. Because we need to use CFTransaction when we need to do long process for so many query transaction within our code with different datasource.

[More]

Webservices without using cfinvoke

As we all know if webservices of another party using window NT authentication, we cannot use CFInvoke for calling webservices. At that time, we need another 3rd party webservices integrator for coldfusion to access another party. At that time, we need to use CFObject instead of CFInvoke.

view plain print about
1<!--- Include .NET webservices DLL file --->
2<cfobject type=".NET" name="webServiceName" class="ViewUserLibrary.UserManagementService" assembly="C:\ViewUserLibrary.dll" />
3<!--- call webservices URL --->
4<cfset webServiceName.set_wsdl("http://10.168.7.71:8080/oaswebservices/OASWebSvcPatientMgmt.asmx?wsdl") />
5<!--- Window NT Username --->
6<cfset webServiceName.set_userId( "CTTT24" ) />
7<!--- Window NT Password --->
8<cfset webServiceName.set_password( "passwd78" ) />
9<!--- Window NT Domain --->
10<cfset webServiceName.set_domain( "CGHAD" ) />
11<cfset dataSetResult = webServiceName.viewUserInfo("CG","PPShein")/>
12
13<!--- Dump it --->
14<cfdump var="#dataSetResult#"/>

My UDF is released at cflib

Today, I've received email from CFLib.org that my UDF called "getProfileStringUTF8". It supports to translate any unicode-based language instead of using GetProfileString which doesn't support Unicode (UTF-8).

You can download and check this one here.

getProfileStringUTF8

Replace Javascript Confirm box with CFMessagebox

In my previous post (here to view), I've mentioned how to replace Javascript Alert box with CFMessageBox. Here again, to replace Javascript Confirm box with CFMessage.

view plain print about
1function DisplayMessageConfirm (obj, messageText) {
2    var RandCount = Math.random();
3    
4    ColdFusion.MessageBox.create(obj + RandCount, 'confirm', 'CESID', messageText, onfinish, {width:300, modal:true});
5    ColdFusion.MessageBox.show(obj + RandCount);
6}

[More]

To replace javascript alert with CFMessagebox

Before my development, I've already used native javascript alert for client side validation message. Some people might complaint why I used native javascript alert instead of jQuery dialogbox, it's because of I don't want to include so many script tags and CSS tags for jQuery mobile.

Today, I've got an idea to replace native javascript alert with cfmessagebox. This function will support to display cfmessagebox instead of javascript alert whenever we have put javascript alert in our coding.

[More]

Parsing List Value in Oracle

Being Coldfusion programmer, parsing list value in coldfusion is very simple. If list value is "list1|list2|list3|list4", we can parse with ListToArray in Coldfusion as follow.

view plain print about
1<cfset MyListValue = "list1|list2|list3|list4">
2<cfset getListDump = ListToArray(MyListValue, "|", true)>
3<cfdump var="#getListDump#">

Above coding, we must need to assign true for includeEmptyFields if list value will contain empty. In Oracle, it's touch to parse and we need to write Oracle function.

[More]

Get Javascript value from Coldfusion in same page

Today, I've found funny resolution to get javascript value from Coldfusion in same page without reloading. I'm not sure whether it might be useful or not, but for me it's kinda useful.

Usage

view plain print about
1<cfsavecontent variable="JSvalue">
2    <script>
3        var whatisyourname = "ppshein";
4        document.write(whatisyourname);
5    </script>
6</cfsavecontent>
7
8<cfoutput>#JSvalue#</cfoutput>

More Entries

Top of Page