Configure AH on a Mac for use with DITA-OT

Post here questions and problems related to editing and publishing DITA content.
shudson310
Posts: 156
Joined: Sat Feb 26, 2005 12:09 am
Location: USA
Contact:

Configure AH on a Mac for use with DITA-OT

Post by shudson310 »

I'm trying to set up Antenna House on a Mac for use with the DITA-OT. I downloaded the latest AH from Github (https://github.com/AntennaHouse/pdf5) and copied it into the DITA-OT folder. I set up a transformation scenario and set:
cust.dir = /Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/
dita.dir = /Applications/oxygen16.1/frameworks/dita/DITA-OT
env.AXF_OPT = /Applications/oxygen16.1/frameworks/dita/DITA-OT/ahf_setting.xml
transtype = pdf5

Antenna House directory is set up as: '${frameworksDir}/dita/DITA-OT/plugins/com.antennahouse.pdf5'

It fails with:
BUILD FAILED
/Applications/oxygen16.1/frameworks/dita/DITA-OT/build.xml:53: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/build.xml:441: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml:164: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml:202: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml:275: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml:284: AHF_DIR folder does not exist or AHF_DIR environment variable is missing.

Total time: 10 seconds

The process finished with exit code: 1

What am I missing? There is not a lot of great documentation (from AH) about how to do this on a Mac.
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Configure AH on a Mac for use with DITA-OT

Post by Radu »

Hi Scott,

The error seems to indicate that the environmental variable AHF_DIR is not set up in the system for some reason.
As a workaround you can edit the transformation scenario and in the Parameters list add a new parameter env.AHF_DIR which points to the folder where the Antenna House application is installed.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
shudson310
Posts: 156
Joined: Sat Feb 26, 2005 12:09 am
Location: USA
Contact:

Re: Configure AH on a Mac for use with DITA-OT

Post by shudson310 »

Hi Radu,

I have gotten a little further, thanks to your help:

BUILD FAILED
/Applications/oxygen16.1/frameworks/dita/DITA-OT/build.xml:53: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/build.xml:441: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml:164: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml:202: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml:275: The following error occurred while executing this line:
/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml:308: exec returned: 127

Total time: 10 seconds

The process finished with exit code: 1

I verified that I have the following installed:
$ java -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
$ ant -version
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Configure AH on a Mac for use with DITA-OT

Post by Radu »

Hi Scott,

I'm not sure.
You will have to open the build file:

/Applications/oxygen16.1/frameworks/dita/DITA-OT/plugins/com.antennahouse.pdf5/build.xml

at line 308 and add some <echo>'s to see what process line gets executed.

Possibly if you edit the transformation scenario, in the Advanced tab there is an Additional arguments field in which you can set -verbose. Then run the scenario, maybe it will output more details from the ant process.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
shudson310
Posts: 156
Joined: Sat Feb 26, 2005 12:09 am
Location: USA
Contact:

Re: Configure AH on a Mac for use with DITA-OT

Post by shudson310 »

Finally figured it out...

it ended up being the shell script. I needed a run.sh in the plugins dir. That shell script needed to include the path to the local AntennaHouse install:

Code: Select all

#!/bin/sh
# XSL Formatter for MacOSX command-line sample shell script
# usage: run.sh [AHFCmd-parameters...]

AHF61_HOME="/Applications/AH/AHFormatterV61"
export AHF61_HOME

AHF61_LIB_FOLDER=${AHF61_HOME}/lib
AHF61_BIN_FOLDER=${AHF61_HOME}/bin
AHF61_ETC_FOLDER=${AHF61_HOME}/etc
AHF61_SDATA_FOLDER=${AHF61_HOME}/sdata

DYLD_LIBRARY_PATH=${AHF61_LIB_FOLDER}:${DYLD_LIBRARY_PATH}
export DYLD_LIBRARY_PATH

AHF61_LIC_PATH=${AHF61_ETC_FOLDER}
export AHF61_LIC_PATH

AHF61_HYPDIC_PATH=${AHF61_ETC_FOLDER}/hyphenation
export AHF61_HYPDIC_PATH

AHF61_DMC_TBLPATH=${AHF61_SDATA_FOLDER}/base2
export AHF61_DMC_TBLPATH

AHF61_DEFAULT_HTML_CSS=${AHF61_ETC_FOLDER}/html.css
export AHF61_DEFAULT_HTML_CSS

AHF61_FONT_CONFIGFILE=${AHF61_ETC_FOLDER}/font-config.xml
export AHF61_FONT_CONFIGFILE

#AHF61_BROKENIMG=${AHF61_HOME}/samples/Broken.png
#export AHF61_BROKENIMG

echo "${AHF61_BIN_FOLDER}/AHFCmd" "$@" 1>&2
"${AHF61_BIN_FOLDER}/AHFCmd" "$@"
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Re: Configure AH on a Mac for use with DITA-OT

Post by tmakita »

Sorry! I completely missed this post.
Integrating PDF5 into oXygen is not well written in the manual (pdf5_manual.pdf) and the error message is not appropriate.

My MAC user uses setting following properties in the transformation scenario as follows:

Property name    Value
=============  =====
ahf.dir              Folder path that AH Formatter is isnatlled.
ahf.opt              Option setting file path for AH Formatter (Optional)

I'm using Windows but my heavy MAC user sets above and running PDF5 from oXygen.

Image

Above is transformation scenario in Windows oXygen. But it is similar in MAC.

Regards,

Toshihiko Makita
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Re: Configure AH on a Mac for use with DITA-OT

Post by tmakita »

I missed making transformation scenario image.
Following is the link. Can you see it?

https://www.dropbox.com/s/9lnkkeil90fra ... o.png?dl=0
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
shudson310
Posts: 156
Joined: Sat Feb 26, 2005 12:09 am
Location: USA
Contact:

Re: Configure AH on a Mac for use with DITA-OT

Post by shudson310 »

Yes, thank you! I will try setting these params.
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Post Reply