I'm the author of the `saxon-xslt` gem used in part by Archivesspace to generate PDFs via Apache FOP, and now the new `saxon-rb` gem.
`saxon-xslt` has been replaced by `saxon-rb`, which is a much more full-featured Saxon wrapper that exposes much more of Saxon's functionality. `saxon-xslt` won't be updated any more - `saxon-rb` provides API compatibility for those that need it.
I'd like you to switch from using `saxon-xslt` to `saxon-rb`. Once this ticket is created, I'll open a PR referencing it containing the changes needed. As a bonus, your PDF generation process currently requires writing the XSL-FO file to disk before re-parsing and processing with FOP because of limitations in `saxon-xslt`'s approach. With `saxon-rb`'s better exposure of the underlying Saxon API, it's possible to directly send the output of the transformation to XSL-FO to FOP via a SAX ContentHandler.
I think it's also possible that this will solve your corrupt-PDFs-on-windows issue - there were some problems with `saxon-xslt`'s serialization code (it wound up ignoring serialization properties in `<xsl:output>`) that could have given you some character encoding problems.
See PR at