Including an End-User-Defined Character (EUDC) in Output PDFs

End User Defined Characters (EUDC) are custom glyphs created by users. Their codes are stored in the Private Use Area available in Unicode or in double-byte character sets.

Notes:

  • In order include an EUDC in an output PDF, the EUDC must reside on your computer.
  • You need to know the Unicode PUA address for the EUDC, and include it in your script.

VBS Example for including an EUDC

If the EUDC resides on your computer, you can include the character when creating a PDF using Toolkit.

The example below shows how to include an EUDC glyph residing in a folder named my_custom_fonts.

The glyph is located in the Unicode Private Use Area at address 0xE034.

 

' Variables ' Template and Output files
varOutputFile = "output_eudc.pdf"

' Instantiate Object
Set TK = CreateObject("APToolkit.Object")

' OpenOutputFile
varReturn = TK.OpenOutputFile(varOutputFile)

If varReturn <> 0 Then

Error("OpenOutputFile")

End If

' False embeds font, True Subsets Font
TK.SubsetFonts = False

' Set the EUDC font, in this example the eudc.ttf is a copy of the eudc.tte
TK.SetFont "C:\my_custom_fonts\eudc.ttf", 100

TK.PrintText 50, 620, ChrW(&HE034)

' CloseOutputFile
TK.CloseOutputFile

' Clear Object
Set TK = Nothing

' Done
Msgbox "Success!"

' Error Handling
Sub Error(Method)

Msgbox "'" & Method & "' failed with a '" & varReturn & _

"'" & VBCRLF & "TK Return Codes:" & VBCRLF & _

"http://www.activepdf.com/support/kb/?id=10670&tk=ts"

Set TK = Nothing

Wscript.Quit

End Sub

Additional information about EUDC

About Windows OS and EUDC used with Unicode and double-byte character sets

Creating an EUDC

https://msdn.microsoft.com/en-us/library/ms900852.aspx

Note: If you use the Microsoft EUDCedit.exe application to create an EUDC, you need to edit the extension in the file name from:

EUDC.tte to EUDC.ttf, and move the file to an easily-mapped-to file location.

activepdf_example_copy_eudc.png

Microsoft EUDC bug information

Some Microsoft operating systems may need a hotfix in order to use EUDC.

Information about Unicode and Private Use Areas

https://en.wikipedia.org/wiki/Private_Use_Areas

×