4371 shaares
Here is a patch to the pdfjam
shell script to make it work under Cygwin:
--- pdfjam.original 2019-01-07 16:12:47.894523500 +0100
+++ pdfjam.patched-for-cygwin 2019-01-07 16:12:33.492142300 +0100
@@ -949,6 +949,9 @@
(umask 077 && mkdir "$PDFJAM_TEMP_DIR")
fi
umask $original_umask
+case `uname` in
+ *CYGWIN*) PDFJAM_TEMP_DIR=`cygpath -w "$PDFJAM_TEMP_DIR"`;;
+esac
##
## TEMPORARY DIRECTORY ALL DONE
##
@@ -1073,7 +1076,10 @@
sourceFullPath="$sourceDir"/"$pdfName"
uniqueName="source-$counter.pdf"
uniqueName="$PDFJAM_TEMP_DIR"/"$uniqueName"
- ln -s "$sourceFullPath" "$uniqueName"
+ case `uname` in
+ *CYGWIN*) cp "$sourceFullPath" "$uniqueName";;
+ *) ln -s "$sourceFullPath" "$uniqueName";;
+ esac
;;
esac
filePageList="$filePageList","$uniqueName","$pageSpec"
@@ -1123,6 +1129,7 @@
texFile="$fileName".tex
msgFile="$fileName".msgs
tempFile="$PDFJAM_TEMP_DIR"/temp.tex
+backslashsafe_filePageList=$(echo $filePageList | sed 's~\\~/~g')
(cat <<EndTemplate
\batchmode
\documentclass[$documentOptions]{article}
@@ -1137,7 +1144,7 @@
\usepackage{pdfpages}
$preamble
\begin{document}
-\includepdfmerge[$miscOptions]{$filePageList}
+\includepdfmerge[$miscOptions]{$backslashsafe_filePageList}
\end{document}
EndTemplate
) > $texFile