| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function docbook_convertToPdfFromXml { |
| |
| |
| cli_printMessage "${FILE}.pdf" --as-creating-line |
| |
| local -a STYLE_TEMPLATE |
| local -a STYLE_INSTANCE |
| local STYLE_INSTANCE_FINAL='' |
| |
| |
| |
| |
| local SRC=${INSTANCE} |
| |
| |
| |
| |
| local DST="${FILE}.pdf" |
| |
| |
| |
| local FO=$(echo ${INSTANCE} | sed -r 's/docbook$/fo/g') |
| |
| |
| |
| local PDF=$(echo ${INSTANCE} | sed -r 's/docbook$/pdf/g') |
| |
| |
| docbook_prepareStyles "${DOCBOOK_XSL}/docbook2fo.xsl" |
| |
| |
| |
| |
| ln -sf ${TCAR_WORKDIR}/trunk/Identity/Images/Webenv $(dirname ${INSTANCE})/Images |
| |
| |
| xsltproc --output ${FO} ${STYLE_INSTANCE_FINAL} ${SRC} 2> /dev/null |
| |
| |
| |
| |
| |
| |
| if [[ $? -eq 0 ]];then |
| pushd $(dirname ${INSTANCE}) > /dev/null |
| xmlto -o $(dirname ${FILE}) pdf ${FO} |
| popd > /dev/null |
| else |
| cli_printMessage "`gettext "Cannot produce the PDF file."`" --as-error-line |
| fi |
| |
| } |