DITA and XMetaL Discussion
jstaggart June 24, 2009 at 5:58 pm
Customize PDF output fonts and RenerX graphic at bottom of pageJune 24, 2009 at 5:58 pmParticipants 11Replies 12Last Activity 13 years, 7 months ago
I have managed to do some customization of the output. I can change the font size, and color. I have tried to change the font-family to something other then Sans or Serif, but it is ignored.
Is there a way to change the font-family?
Is there a way to remove the RenderX graphic and and message “XML to PDF by RenderX…..” from the bottom of the page?Derek Read June 25, 2009 at 8:45 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageJune 25, 2009 at 8:45 pm
The DITA OT specifies only three font types for PDF including “Sans”, “Serif” and “Monospaced”. These are mapped to actual fonts elsewhere.
To change the actual font family you need to map it to “Sans”, “Serif” or “Monospaced” (or any other font references in the XSLT / XSL-FO that you might create yourself). This is done in the following file located here (by default):
C:Program FilesCommon FilesXMetaL SharedDITA_OTdemoxmfocfgfofont-mappings.xml
C:Program FilesCommon FilesXMetaL SharedDITA_OTdemofocfgfofont-mappings.xml
The first is for the “XMetaL Enhanced PDF…” deliverables, the second is for the “Book via RenderX” deliverable (referred to as “PDF2” in the DITA OT docs).
In that file you map “logical fonts” (those referenced in the XSLT / XSL-FO) to “physical fonts” (either Adobe PDF “Base 14” fonts, or those referenced in a file called xep.xml).
If the font you specify is not one of the Adobe PDF “Base 14” fonts you will need to embed it into the PDF to ensure universal readability on every system. This is done by modifying a RenderX XEP configuration file located here (by default):
C:Program FilesCommon FilesXMetaL Sharedrenderxxep.xml
Note: RenderX XEP includes documentation and additional tools inside subfolders in the same folder.
RenderX includes sample font mappings so you can study and reuse those. Find the following comment in xep.xml:
The section right after that comment is entirely commented out, it begins like this:
This section is a sample, but if you remove the comments surrounding the section XEP will then begin embedding the fonts called “Arial”, “Times New Roman”, “Courier New”, etc… (provided they are installed in C:WindowsFonts, which is also configurable in the same section) and provided you have referenced them in the file mentioned previously. You can also add your own sections to map other fonts. The sample is thorough enough that it should show you how to do that.jstaggart June 29, 2009 at 6:53 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageJune 29, 2009 at 6:53 pm
I am getting closer, but I am getting some error messages. I have the fonts installed and they are in the c:windowsfonts directory (the *.pfm files). I put hte *.afm files in C:program filesCommon FilesXMetaL Sharedrenderxfonts. I modified the xep.xml file as follows:
If I specify afm=….. I get the message that there is no outline file for font metric. If I specify pfm=… I get the message font metrics file not found. If I include both afm= and pfm= it tells me the configuration is corrupt.
Any ideas as to what I am doing wrong?Derek Read June 30, 2009 at 7:21 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageJune 30, 2009 at 7:21 pm
I think the posting here may help you:jstaggart July 1, 2009 at 5:05 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageJuly 1, 2009 at 5:05 pm
Thanks Derek! I got it to work.PhysicianHealthBC August 20, 2010 at 8:15 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageAugust 20, 2010 at 8:15 pm
Hi Derek, I am reading all of this and noting that .pfa, .pfb and .afm font types are mentioned. I would like to ask if this customization will work with .ttf font files stored in the Windows fonts area?
Sorry if this is a silly question, I am new here.Su-Laine Yeo August 21, 2010 at 12:19 am
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageAugust 21, 2010 at 12:19 am
Yes, you can use TrueType (.tff) fonts. An example of declaring .tff fonts in the xep.xml file is here:
http://services.renderx.com/lists/xep-support/4657.htmlDerek Read August 21, 2010 at 5:07 am
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageAugust 21, 2010 at 5:07 am
You can find detailed information on the types of fonts XEP supports and how it supports them here: http://www.renderx.com/reference.html
Search for “ttf”, “font”, etc, and you should find information relevent to configuring (specifically) the xep.xml file.
But yes, it supports TTF in addition to these other types. If you open the xep.xml file (discussed in this thread) you will see a sample section inside it that is commented out (search for “.ttf”). It lists .ttf fonts that Microsoft commonly installs as part of Windows (Arial, Times New Roman, etc).PhysicianHealthBC August 25, 2010 at 8:48 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageAugust 25, 2010 at 8:48 pm
Thank you Su for the prompt reply. I will check it out.
Also in this thread title it mentioned about the RenderX graphic at the bottom of the page. Can someone kindly please advise on removing all RenderX references and links that appear on the PDF outputs.
One line reads: 'XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/' and there is also the RenderX graphic logo along with a message saying 'Welcome to XML Author' on all pdf outputs.
Thank you in advance.Derek Read August 25, 2010 at 10:51 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageAugust 25, 2010 at 10:51 pm
If you are running XMetaL Author Enterprise in trial mode then RenderX XEP is also running in trial mode. In trial mode XEP puts this logo on the bottom of each page and also prints blank pages after the first dozen.
If you convert a trial install to a licensed install you may continue to see the XEP logo. This is described in the release notes that ship with XMetaL Author Enterprise 6.0:
[quote=XMEE 6.0 Release Notes]Generating PDF output still shows watermark after activating from a Trial to Full version
Before you generate output from a map after activating a Trial version to a Full version, do the following:
1. Click Tools > Configure Output and click the Advanced tab.
2. In the Advanced tab, change the value of the cmd_dita_ot_per_user_version parameter as follows: cmd_dita_ot_per_user_version = 0
When you generate output, you may be asked if you want to upgrade to a newer version of the toolkit. Click OK.
The text that states “Welcome to XMetaL Author” is coming from the map title. If you change the map title or produce a PDF from a different map with a different title this text should change. If you do not want to ever see titles in this location then customizations will need to be made to the XSLT that produce output.IF October 1, 2010 at 8:15 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageOctober 1, 2010 at 8:15 pm
All this information and the info in http://forums.xmetal.com/index.php/topic,968.0.html is very useful.
However, I can’t figure out how to specify the Calibri font in the xep.xml file.
This does not work
I get the following error message when I try to create output from XMetal (Enhanced PDF with RenderX XEP), XMetal 6, Windows 7
[java] [error] Cannot read font metric from file:/C:/Windows/Fonts/calibrii.tff
[java] [error] java.io.FileNotFoundException: C:WindowsFontscalibrii.tff (The system cannot find the file specified)
[java] Rendering failed: Could not obtain font metric for font family 'Calibri'
Does anyone know how to refer to the calibri italic, calibri bold, and calibri italic bold fonts on Windows 7? I can get calibri regular to work (XEP accepts calibri.tff but cannot find calibrii.tff for instance)
When I search for these fonts on my machine, I see the following in the c:windowsfont directory: Calibri Bold, Calibri Bold Italic, Calibri Regular, Calibri Italic. There are no file extensions (e.g., no .tff).
Thanks.Derek Read October 1, 2010 at 10:18 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageOctober 1, 2010 at 10:18 pm
I assume surrounding what you have posted is something like the following so XEP knows where the directory is:
Perhaps the fonts really are missing or somehow located somewhere else? I can reproduce the exact same error when I specify a missing font file. I'm not sure how to reproduce it otherwise.
See this thread that discusses how to view font file names in Windows 7: http://www.sevenforums.com/general-discussion/84516-fonts-dont-show-file-extensions.html
Or perhaps your font does not allow embedding? Following is from the [url=http://mediawiki.renderx.com/index.php/XEP_User_Guide/Configuring_XEP]XEP docs[/url]:
Note: TrueType and OpenType fonts may contain internal flags that prohibit their embedding or subsetting. XEP honors these flags and may refuse to embed or subset your font if the respective action is not authorized by the flags inside it.
Though in that case I would sort of expect XEP to give a better error message.IF October 1, 2010 at 10:56 pm
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageOctober 1, 2010 at 10:56 pm
Thanks – I confirmed the filename extensions using the command prompt window. I then tried to edit the xep.xml file again and this time it worked. I'm embarrassed to say that it did not work the first time because I made a typo (ttf vs tff). I should have picked that up from the log error message if I had read it carefully. Thanks for the prompt reply.
- You must be logged in to reply to this topic.