DynamicPDF.Font

DynamicPDF.Font

Forum member · Jan 18, 2006
I am building an application that will build PDF documents dynamically based off of data stored in a database. For every element that needs to be added to a page, i store the appropriate values (xaxis, yaxis, height, etc...) At this point in development i have only worked on getting DynamicPDF.PageElements.Label objects to render. everything is fine and dandy until i try to set the Font, TextAlign and Color properties. Since i have a string value, 'Font.Courier' for example, and the new label method is looking for an object, i'm kinda stuck. Am I having a brain fart and missing the obvious? I know i could write a case statement that returns me the appropriate object, but it seems to me that there should be an easier way to go from a string to an object. even if it's something like: cete.DynamicPDF.Font.FindByName("Font.Courier")

Re: DynamicPDF.Font

Forum member · Jan 18, 2006
and on this topic... Is there built in fucntionality to support non standard fonts? If so, how would i impliment this?

Re: DynamicPDF.Font

Support · Jan 18, 2006
In the current version, the only way to accomplish this is to use a case statement. The fuctionality you described is on our wish list and will be added in a future version. You can use TrueType and Type 1 fonts. Here is a link to a help topic showing how to use them: TrueType Fonts Type 1 Fonts Thanks, ceTe Software Support Team

Re: DynamicPDF.Font

Forum member · Jan 18, 2006
thanks for the response. i look forward to a version with this functionality for all types found within the cete.dynamicPDF namespaces. thanks for the links too. that was exactly what i was looking for.

Re: DynamicPDF.Font

Forum member · Jan 20, 2006
Part 2 of the font questions... Does dynamicPDF support the ability to specify a font letting in addition to the size? If so, how? If not, when? also, what is the difference between a label and a textarea? Thanks Levi

Re: DynamicPDF.Font

Support · Jan 20, 2006
Levi, The Leading property can be set on the TextArea object. The TextArea has the ability to control the overflow of text where the Label does not. The Label would typically be used for more predictable text where the TextArea can be used for completely dynamic text where you can dynamically calculate height and overflow. Thanks, ceTe Software Support Team

Re: DynamicPDF.Font

Forum member · Apr 6, 2006
Not sure if anyone else will find this useful, but here is a nice function to use that accepts a string value as a param and returns a ceTe.DynamicPDF.Font object. It will return you any of the built in fonts, as well as any TrueTypeFonts. oh, and i'm not an advocate of switch statements, but they do work for quick and dirty solutions: Protected Overridable Function GetFont(ByVal input As String) As ceTe.DynamicPDF.Font Dim myFont As ceTe.DynamicPDF.Font If input.LastIndexOf("Font.") > -1 Then Select Case input Case "Font.Courier" myFont = Font.Courier Case "Font.CourierBold" myFont = Font.CourierBold Case "Font.CourierBoldOblique" myFont = Font.CourierBoldOblique Case "Font.CourierOblique" myFont = Font.CourierOblique Case "Font.HanyangSystemsGothicMedium" myFont = Font.HanyangSystemsGothicMedium Case "Font.HanyangSystemsShinMyeongJoMedium" myFont = Font.HanyangSystemsShinMyeongJoMedium Case "Font.HeiseiKakuGothicW5" myFont = Font.HeiseiKakuGothicW5 Case "Font.HeiseiMinchoW3" myFont = Font.HeiseiMinchoW3 Case "Font.Helvetica" myFont = Font.Helvetica Case "Font.HelveticaBold" myFont = Font.HelveticaBold Case "Font.HelveticaBoldOblique" myFont = Font.HelveticaBoldOblique Case "Font.HelveticaOblique" myFont = Font.HelveticaOblique Case "Font.MonotypeHeiMedium" myFont = Font.MonotypeHeiMedium Case "Font.MonotypeSungLight" myFont = Font.MonotypeSungLight Case "Font.SinoTypeSongLight" myFont = Font.SinoTypeSongLight Case "Font.Symbol" myFont = Font.Symbol Case "Font.TimesBold" myFont = Font.TimesBold Case "Font.TimesBoldItalic" myFont = Font.TimesBoldItalic Case "Font.TimesItalic" myFont = Font.TimesItalic Case "Font.TimesRoman" myFont = Font.TimesRoman Case "Font.ZapfDingbats" myFont = Font.ZapfDingbats Case Else Throw New ApplicationException(String.Format("The Font of {0} is not a supported font.", input)) End Select Else myFont = New ceTe.DynamicPDF.Text.TrueTypeFont(input) End If Return myFont End Function

Re: DynamicPDF.Font

Forum member · Apr 9, 2006
Your product is great and the it's really the kind of software that i've been looking for, coz most of my applications needs reporting. Anyway, my problem is, localization. Here in Saudi Arabia we need to print arabic characters too. Is there any support or additional fonts for arabic characters? I'd really appreciate your quick help coz we're meeting a deadline here. Thanks.

Re: DynamicPDF.Font

Forum member · Apr 9, 2006
In arabic language, right-to-left direction is a must. Please see this matter. Thanks!

Re: DynamicPDF.Font

Support · Apr 10, 2006
Hello, There are no particular Arabic fonts that are built into our product, but Arabic text is supported. You will just have to include a TrueType or Typpe1 font of your own which has support for Arabic characters. Thanks, ceTe Software Support Team

Re: DynamicPDF.Font

Support · Apr 10, 2006
Hello, In order to display the text from right-to-left, you will have to set the RightToLeft property of the TextArea object or the Label object to true along with using any TrueType or Type1 font that has support for Arabic characters. Thanks, ceTe Software Support Team