[Archivesspace_Users_Group] Does the API endpoint for PDFs work?

Majewski, Steven Dennis (sdm7g) sdm7g at virginia.edu
Wed May 16 12:50:58 EDT 2018



> On May 16, 2018, at 11:51 AM, Celia Caust-Ellenbogen <ccauste1 at swarthmore.edu> wrote:
> 
> Thanks, Steve, for the tip! Validating the EAD showed me an unescaped ampersand that was causing the problem.
> 
> I'm worried there might be more culprits like this lurking in our database...does anyone know of an existing script to check for rogue unencoded special characters?
> 
> And I am still curious about the API endpoint for EAD...has anyone used this successfully? Is the problem specific to me or should I create a JIRA ticket?
> 

Yes. I’ve been using it. All of the outstanding issues I’ve seen have been content dependent, and are due to that particular content producing malformed EAD that fails on the next step. It might be good to collect some examples of the different failure modes. 
Two others that I recall seeing ( unfortunately, I don’t have saved examples at hand, so just going by memory and missing some details) : 

  If a note contains mixed content, like title or emphasis tags, especially if the tag begins an implicit paragraph, it can serialize the output with the tags overlapping rather than embedded. 

  If a note or resource is marked published, but some inner note that is required to complete the EAD serialization is unpublished, and export unpublished is not selected, it can produce EAD that doesn’t validate due to the missing element. ( I really wish I could recall or reconstruct the exact elements that this occurred on! ) 

If you are trying to script PDF production using the API, it may be better to export EAD and and run the other steps ( validation, as-ead-pdf.xsl stylesheet, FOP processor ) in the script that is calling the ASpace API. 


— Steve. 



> On Tue, May 15, 2018 at 4:19 PM, Majewski, Steven Dennis (sdm7g) <sdm7g at virginia.edu <mailto:sdm7g at virginia.edu>> wrote:
> Try exporting the EAD and validating. 
> There are still some cases where it exports malformed XML in some cases where these is mixed content in a note.
> The staff PDF export, first exports EAD which then goes to the as-ead-pdf.xsl stylesheet and then to the FOP processor. 
> Feeding badly formed XML to the stylesheet will fail, and the error messages don’t seem to be caught. 
> 
> — Steve. 
> 
> 
> 
>> On May 15, 2018, at 4:12 PM, Celia Caust-Ellenbogen <ccauste1 at swarthmore.edu <mailto:ccauste1 at swarthmore.edu>> wrote:
>> 
>> This is on 2.3.2. I can print PDFs manually from the PUI but when I try to automate printing via the API, I get these blank PDFs.
>> 
>> I'm doing all this because I have a particular resource record that is mysteriously giving me an error message when I try to print a PDF from the PUI (this one: http://archives.tricolib.brynmawr.edu/repositories/9/resources/5678 <http://archives.tricolib.brynmawr.edu/repositories/9/resources/5678>) and I am trying to understand what might be causing the problem.
>> 
>> Thanks in advance for any advice or insight!
>> 
>> On Tue, May 15, 2018 at 3:05 PM, Seth Shaw <seth.shaw at unlv.edu <mailto:seth.shaw at unlv.edu>> wrote:
>> What version do you have running? PDF export via API broke with 2.2.0 but was fixed in 2.3.0.
>> 
>> On Tue, May 15, 2018 at 11:55 AM, Celia Caust-Ellenbogen <ccauste1 at swarthmore.edu <mailto:ccauste1 at swarthmore.edu>> wrote:
>> Hello all,
>> 
>> Has anyone had luck using the API endpoint to print a PDF? I am getting blank PDFs that have appropriate bookmarks (different for each PDF I print, appropriate headings for the specific resource) but no text in the document. Am I doing this wrong or does the endpoint not work? 
>> 
>> I noticed the API documentation says "EAD" instead of "PDF" ([:GET] /repositories/:repo_id/resource_descriptions/:id.pdf        Description: Get an EAD representation of a Resource) so I suspect this feature may not be fully developed.
>> 
>> Thanks!
>> Celia
>> 
>> -- 
>> Celia Caust-Ellenbogen 
>> Friends Historical Library of Swarthmore College <http://swarthmore.edu/friends-historical-library>
>> 610-328-8496
>> ccauste1 at swarthmore.edu <mailto:ccauste1 at swarthmore.edu>
>> she/her/hers <https://www.mypronouns.org/she-her>
>> 
>> 
>> 
>> _______________________________________________
>> Archivesspace_Users_Group mailing list
>> Archivesspace_Users_Group at lyralists.lyrasis.org <mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group <http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group>
>> 
>> 
>> 
>> _______________________________________________
>> Archivesspace_Users_Group mailing list
>> Archivesspace_Users_Group at lyralists.lyrasis.org <mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group <http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group>
>> 
>> 
>> 
>> 
>> -- 
>> Celia Caust-Ellenbogen 
>> Friends Historical Library of Swarthmore College <http://swarthmore.edu/friends-historical-library>
>> 610-328-8496
>> ccauste1 at swarthmore.edu <mailto:ccauste1 at swarthmore.edu>
>> she/her/hers <https://www.mypronouns.org/she-her>
>> 
>> 
>> _______________________________________________
>> Archivesspace_Users_Group mailing list
>> Archivesspace_Users_Group at lyralists.lyrasis.org <mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group <http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group>
> 
> 
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org <mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group <http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group>
> 
> 
> 
> 
> -- 
> Celia Caust-Ellenbogen 
> Friends Historical Library of Swarthmore College <http://swarthmore.edu/friends-historical-library>
> 610-328-8496
> ccauste1 at swarthmore.edu <mailto:ccauste1 at swarthmore.edu>
> she/her/hers <https://www.mypronouns.org/she-her>
> 
> 
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20180516/aead7883/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6091 bytes
Desc: not available
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20180516/aead7883/attachment.bin>


More information about the Archivesspace_Users_Group mailing list