cancel
Showing results for 
Search instead for 
Did you mean: 
1 Reply
StefanT-Xerox
FreeFlow User

Re: Watermark with special Characters from a Unicode Font Set

I gave this a try by using some random font and for some reason characters that don't have a keystroke option in the Windows Character Map for the font are printed blank in the Watermark node. I would like to suggest that you contact your local Xerox support so the issue can be escalated the formal way.

As a workaround it seems that a script can do this instead. It is not as straight forward but then all characters for the selected font I used are printed as they should. Here is how to do it if you want to give it a try:

The attached zip file contains two files - one batch file and one Python script. Both scripts need to be placed in the FreeFlow Core scripts folder. My script folder is on C: and if yours is not you need to change the path to the scripts folder in the batch file by changing the drive letter (D:\, E:\ etc). The batch file calls the Python script and has to be installed on the FreeFlow Core server. Python can be downloaded from here https://www.python.org/downloads/

In my case the batch file looks like below and points to both Python.exe and the Python script.

"C:\Program Files\Python38\python.exe" "C:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts\unicodeprinter.py" %1 %2

Python then uses PyPDF2 and reportlab that you will need to install. After installing Python, from command line as an administrator run:

pip install pypdf2

and then:

pip install reportlab

Now, in the workflow you need to replace the Watermark in the workflow with an External Process. Create a new External Process and use the batch file as the script. Use the default parameters $FFin$ and $FFout$.

Before running a job through, if you haven't done so already, first install the font (right click and install font) you want to use and restart FreeFlow Core. Open the Python script in some text editor like Notepad for instance. In the script locate the line:

pdfmetrics.registerFont(TTFont('Yiggivoo', 'Yiggivoo Unicode Regular.ttf'))

Replace the name of the font and what you want to call it with valid values for you.

A new pdf will be created that is then merged with the pdf submitted to the workflow. Locate the lines:

    # Select font, fontsize and print stuff on each page
    can.setFont("Yiggivoo", 32)
    can.drawString(100, 420, "ỤụỨứỪừỬỮỰỲỴỴỴỶỸỹ–—‘“†‰›‹⁄™fifl")

This calls the font, the font size, where on each page and what characters should be printed. You need to input your own values and text string here. Save the Python script.

After this is done you can submit a pdf to the workflow and watch the result.

Stefan

 

 

 

0 Kudos
Werner
FreeFlow User

Watermark with special Characters from a Unicode Font Set

Hello,

I want to use a special Character Symbol from a Unicode Font Set as Watermark within FFCore 5.4.4.

These Characters Symbols present different Country Signs for Countries like France, UK, Germnay or the US and should prepend as an language sign the following Test, that is deerived from a MAX varialbe.

These Characters are placed in the upper part of the Unicode Character Table of those Fonts.

Is there a possiblity to add such a Character Symbol into the Watermark Funktion of FFCore.
I tried to copy it from the character Table of the Font into the Watermark Text field of FFCore, but that did not work.

Any suggestions, how I can add those speical Smbols of a Font to the Watermark function of FFCore.

Thank you

Regards

Werner Dirckmann

0 Kudos