Page 1 of 1

Configure AH on a Mac for use with DITA-OT

Posted: Sat Mar 07, 2015 3:28 am
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.

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

Posted: Mon Mar 09, 2015 8:46 am
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

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

Posted: Mon Mar 09, 2015 5:37 pm
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

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

Posted: Mon Mar 09, 2015 5:45 pm
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

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

Posted: Mon Mar 09, 2015 8:50 pm
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" "$@"

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

Posted: Tue Apr 28, 2015 3:14 pm
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

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

Posted: Tue Apr 28, 2015 3:21 pm
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

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

Posted: Tue Apr 28, 2015 5:34 pm
by shudson310
Yes, thank you! I will try setting these params.