Dear Ms. Yuriko N.,
I tried (and, sorry, miserably failed) to explain that setting
FOP.pdfFonts using -putprefs has no effect whatsoever, unless a property
called XXE_FOP_CONFIG pointing to an existing fop.conf file has been
specified.
The -putprefs trick is useful for other cases than FOP.pdfFonts. That's
why I wrote about it but this seems to have mislead you. Sorry for that.
FOP.pdfFonts is *not* *documented* for a good reason. It is not a "real"
user preference. It's just an *internal* *private* setting which is
automatically computed from the detection by XXE (e.g. by the means of
property XXE_FOP_CONFIG) and existence of FOP configuration file fop.conf.
We could even completely remove the support for key FOP.pdfFonts
starting from next version of XXE, without any bad effects on existing
installations of XXE.
I'm afraid you don't have any other choice but follow this procedure:
1) Use XXE's "Options|Preferences", "Add-on|FOP" screen to specify which
fonts you want FOP to use.
2) In the add-on directory where you are creating your "customize.xxe"
file, copy "XXE_user_preferences_dir/fop/fop.conf".
3) Add this property to "customize.xxe":
---
<property name="XXE_FOP_CONFIG" url="true">fop.conf</property>
---
(References:
* http://www.xmlmind.com/xmleditor/_distrib/doc/configure/property.html
*
http://www.xmlmind.com/xmleditor/_distrib/doc/help/system_properties.html#XXE_FOP_CONFIG
)
4) Delete folder "XXE_user_preferences_dir/fop/" as it is no longer
needed (and as it now gets in the way).
--> More useful explanations below.
On 02/01/2017 03:59 AM, Yuriko N. wrote:
Dear Mr. Hussein Shafie,
Thank you for the explanation. I understand the structure.
I'd rather NOT put to FOP.conf directly and refer from customize.xxe,
because initial Font set will be a mere suggestion to the users they need
to be able to change
fonts via XXE preference FOP interface if they want later.
I understand.
Let's suppose you package your customize.xxe in an corporate
configuration add-on (like "A sample customize.xxe", see
http://www.xmlmind.com/xmleditor/addons_doc.html#sample_customize_xxe).
This kind of add-on is marked as being compatible with several versions
of XXE, e.g. xxeVersion=7.0+, with a PLUS at the end of the version
number. See "Chapter 11. Packaging an add-on for XMLmind XML Editor
integrated add-on manager",
http://www.xmlmind.com/xmleditor/_distrib/doc/dev/pack_addons.html
Therefore, this kind of add-on is by default installed in
XXE_user_preferences_dir/addon/, which is a folder having read/write
permissions for the user.
This means that even with a customize.xxe defining property
XXE_FOP_CONFIG pointing to fop.conf, the user will be able to change the
FOP fonts normally, using the "Preferences" dialog box
(http://www.xmlmind.com/xmleditor/_distrib/doc/help/addonOptions.html#fopOptions)
In fact, using the "Preferences" dialog box to change FOP fonts will
have the effect of *modifying* the fop.conf file pointed to by
XXE_FOP_CONFIG.
This works just fine. I've retested that.
OTOH if your corporate add-on is installed in XXE_install_dir/addon/,
this folder generally does not have read/write permissions for the user
and using the "Preferences" dialog box to change FOP fonts will fail.
So, I am trying to use your other suggestion, use -putprefs from file.
But FOP.pdfFonts does not seem to work even by using -putprefs.
I set like the following (please read this email in html mode)
Then checked preferences.properties as follows. (I also tried generating
PDF which went fine)
Next I copied the above to my putprefs file (attached file to this email).
Then deleted those prefs from GUI.
Started xxe with “xxe –putprefsNECJapanCommon_prefs.properties”.
Result, the prefs other than FOP.pdfFonts are set correctly, but not
FOP.pdfFonts.
Still empty as I show here.
This is normal. Not a bug. See below.
Also, another curious poit is that “xxe –delpref”command worked for
other prefs but it
doesNOT work for FOP.pdfFonts.
This is normal. Not a bug. See below.
I needed to reset by remove fonts (selecting and using “Remove”button)
from xxe GUI.
Please support how I can handle FOP.pdfFonts data via –putprefs/-delpref.
FOP.pdfFonts is not a "real" user preference. Setting/unsetting using
–putprefs/-delpref technically works, but has no effect on XXE. Only the
detection by XXE and existence of FOP configuation file fop.conf has.
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support