AEM Forms 6.2 JEE - Embedding Fonts | Community
Skip to main content
James_R_Green
Level 6
May 1, 2018
Solved

AEM Forms 6.2 JEE - Embedding Fonts

  • May 1, 2018
  • 13 replies
  • 7243 views

Hi,

I have a PDF template that uses a custom font let's call it XYZ. Data is being added to this form via the PDF output service. When viewed on a machine that doesn't have XYZ installed, the font is not present. I would like to embed XYZ into the generated PDF document as I do not expect users to have the font installed as a prerequisite of viewing my documents! I think this maybe possible as I can see embed options on the server, but can't find detailed documentation online.

Below is what I have tried so far:

The font is installed on the windows machine the server is running on and is also available in the aem forms/font directory referenced within the settings of adminui.

I have also tried to "always embed" the  fonts in a couple of places

Home > Services > PDF forms

Font Embedding Settings

     Always Embed Fonts: XYZ

and I also tried adding a configuration under:

Home > Services >PDF Generator > Adobe PDF Settings

Always embed: XYZ

The always embed fonts setting is also check here, and I set this configuration to be the default.

I have restarted the server after making these changes.

Does anyone know the steps to embed a custom font?

Thanks,

Jim

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DarrenBiz

Have you definitely got all of the font files you require on the Linux instance? Are they located in a font configuration folder that the JEE instance can access with the correct read perms?

Have you added in the addition RPMs, etc for Linux that are listed here: Installing and configuring AEM 6.1 forms (the link says 6.1 but its actually 6.2)

13 replies

James_R_Green
Level 6
May 10, 2018

I looked at this again today, although I was able to embed the fonts using PDFa files on a window server with workbench.

Now that I have tried the same thing in java on the linux server my client is using, I cannot embed fonts.

Instead of PDF/a I am trying Mayank Gandhi​ suggestion of using an xci file.

I am trying the following:

File xciFile = new File ("/jboss/standalone/svcdata/XMLFormService/default.xci");

Document xci = new Document (xciFile);

pdfOptions.serXci(xci);

generatedDocument = outputService.generatePDFOutput(document,xmlData,pdfOptions);

I get an error, even with an un-modified default.xci:

AEM_OUT_001_003 PAExecute Failure: XFA_RENDER_FAILURE

Any ideas? Do you have a full example xci to use instead of the default.xci? Am I passing the xci file to the output service incorrectly?

DarrenBiz
DarrenBizAccepted solution
Level 6
May 11, 2018

Have you definitely got all of the font files you require on the Linux instance? Are they located in a font configuration folder that the JEE instance can access with the correct read perms?

Have you added in the addition RPMs, etc for Linux that are listed here: Installing and configuring AEM 6.1 forms (the link says 6.1 but its actually 6.2)

James_R_Green
Level 6
May 11, 2018

DarrenBiz

Adding my font folder to CQ-DAM-Handler-Gibson Font Manager Service (mentioned on the install guide you linked to) looks to have resolved my issue - thanks!