[Archivesspace_Users_Group] ArchivesSpace failing to export resource to PDF
Adams, Thomas
tadams at cshl.edu
Wed Jun 27 14:58:30 EDT 2018
Our problem exporting a PDF from an ArchivesSpace resource has been resolved. Big thanks to Mark Custer for identifying the problem.
The method used to identify the problem was to export the resource as an EAD file. Then open the file in the oXygen XML editor and run validate. In this particular case, the editor flagged two <index id="aspace_..."> tags which did not have any <indexentry> elements within. It also flagged a normalized date which only had a single digit in the day field.
Once the errors were flagged in the XML editor, it was easy to determine which archive object needed to be adjusted. In my case just changed the Note type from "Index" to "Arrangement".
There also exist the possibility that the EAD is valid, but the XSLT file might still be throwing an error. Since there does not appear to be an way to capture the temporary XSL-FO file on the ArchivesSpace server, the following was suggested by Mark:
"For my testing, I always export the EAD and then run the same transformation process through oXygen XML Editor. If the PDF file fails, then oXygen keeps the temporary XSL-FO in the same location as the source EAD file, and it's easy enough to inspect things from that to see what's going on."
So it appears that behind the scenes, the PDF creation process first generates a EAD XML file, which is then transformed into a PDF by a XLST file.
Thanks
-Tom
From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Adams, Thomas
Sent: Tuesday, June 26, 2018 1:04 PM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] ArchivesSpace failing to export resource to PDF
Mark,
Thanks for your offer to look over my EAD, with regards to my inability to generate a PDF from a resource. I will directly forward you the EAD file (and a copy of the same file formatted for better viewing.)
The "Oral History" collection is the resource I was attempting to generate a PDF from. You are able to view it at:
http://archivesspace.cshl.edu/repositories/2/resources/39
BTW - Is it possible to capture the temporary XSL-FO file on my end, before it is removed by the termination of the PDF generation?
That might give me a hint to which archival object might be a problem.
Celia,
With regards to your question: Are you using the pdf_per_repository plugin from UNLV?
No. I am using the built in ASpace staff interface.
Thanks
-Tom Adams
From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Custer, Mark
Sent: Tuesday, June 26, 2018 9:58 AM
To: Archivesspace Users Group (Archivesspace_Users_Group at lyralists.lyrasis.org)
Subject: Re: [Archivesspace_Users_Group] ArchivesSpace failing to export resource to PDF
Thomas,
If you could send me a copy of the EAD file, I can take a look this afternoon (I'm working on a new process to create PDF files in ASpace using the new EAD3 export option, but I have the current ASpace PDF files handy for testing).
The issue is definitely that the current EAD to PDF process is creating an invalid XSL-FO file, which Apache FOP cannot then render properly as a PDF file, as Trevor mentioned. Without seeing the EAD file, though, it's impossible to tell if there's an issue in the EAD or the XSL file that's being used to create the temporary XSL-FO file.
Mark
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Adams, Thomas <tadams at cshl.edu>
Sent: Monday, June 25, 2018 6:14:09 PM
To: Archivesspace Users Group (Archivesspace_Users_Group at lyralists.lyrasis.org)
Subject: [Archivesspace_Users_Group] ArchivesSpace failing to export resource to PDF
>From the staff interface in ArchivesSpace 2.3.2, I am attempting to "Export | Print resource to PDF". The batch submission get things started fine, but the job ends up with a failure status when it completes.
I see the following error message:
# more /home/archivesspace/archivesspace-v2.3.2/archivesspace/data/shared/job_files/print_to_pdf_job_236/output.log
Generating PDF for Oral History
org.apache.fop.fo.ValidationException: "fo:list-block" is missing child elements. Required content model: marker* (list-item)+ (See position 1794:68)
org.apache.xalan.transformer.TransformerIdentityImpl.transform(org/apache/xalan/transformer/TransformerIdentityImpl.java:502)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
....
Trevor Thornton gave the following suggestion to the ASpace mailing list (back in 2017-03-21) to a similar error message:
Looks like there is a list in a note somewhere that has no list items -
that what this seems to be saying:
org.apache.fop.fo.ValidationException: "fo:list-block" is missing child
elements. Required content model: marker* (list-item)+ (See position 508:68)
I would try to export the resource as an EAD, and if that works you might
more easily search through the XML to find the problem.
I was able to "Export | Download EAD", that resource as suggested, but there were only three <list type="ordered"> tags in the EAD and all of them had <head> and <item> as children.
I also looked on the ArchivesSpace server and was not able to find a temporary file created at that time, that might have position 1794:68 (line#:char).
Any suggestions on what to try next?
Thanks
-Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20180627/cf7c5f66/attachment.html>
More information about the Archivesspace_Users_Group
mailing list