These instructions describe how to do this locally. There are two motivating reasons:
- ArchivesSpace Rack time out errors when attempting to export pdf.
- Batch pdf processing (assuming batch EAD export not covered here).
- Create and enter a working directory (i.e.
mkdir ead_to_pdf
). - Create the file
as-ead-pdf.xsl
and copy and paste the contents of this file into it. - Create the file
as-helper-functions.xsl
and copy and paste the contents of this file into it. - Create an
ead
directory. - Download Saxon, unzip to working directory and rename to
saxon.jar
. - Download Fop.
- Add the
fop
directory to$PATH
(you should be able tofop -v
).
Place EAD XML files in the ead
directory.
# run saxon on ead files
for file in ead/*.xml ; do java -jar saxon.jar ${file} ./as-ead-pdf.xsl -o:${file/%.xml/.fo} ; done
# run fop on .fo output files
for file in ead/*.fo ; do fop -fo ${file} -pdf ${file/%.fo/.pdf}; done
Hi Mark-
Just discovered this in trying to diagnose the problem of EAD/PDF exports timing out. I'm assuming that the fact that you did this means that there is no real fix for the underlying problem (the Rack timeout). Is that a safe assumption?
Anyway, thanks for this either way.
-Trevor