[Archivesspace_Users_Group] PDF Export Logo Issue

Andrew Morrison andrew.morrison at bodleian.ox.ac.uk
Fri Jun 5 14:56:06 EDT 2020


You also need to trigger a re-index after you change the branding image 
URL. That is because when generating PDFs the PUI uses a copy of the URL 
included in every resource, along with other repository information, at 
index time.


SVGs don't work. PNGs and JPEGs do.


Andrew.



On 05/06/2020 18:28, Andrew Morrison wrote:
>
> Anything that involves the backend, or XSL, is the code for the PDFs 
> you get in the staff interface.
>
>
> The public user interface generates its own PDFs, by first building a 
> HTML document using ERB templates, just as it does for ordinary pages. 
> But instead of returning that it stores it as a temporary HTML file, 
> then converts that to a PDF file using a Java library 
> <https://github.com/flyingsaucerproject/flyingsaucer>. Then it sends 
> the PDF file to the user.
>
>
> The logo is an /img/ tag with the /src/ attribute using the branding 
> image URL set for the repository of the resource. The HTML-to-PDF 
> library is effectively like a web browser running on the server, 
> viewing a local file, so it needs a full URL, not a path relative to 
> the server root. Or, if the image is hosted on another server, then 
> there must be nothing to block the outgoing HTTP request or returned 
> response. Ask you local network admins if unsure. It doesn't cache the 
> image, so every time a user requests a PDF, the ArchivesSpace server 
> will download the image from wherever you specify.
>
>
> The image must be in a format supported by the HTML-to-PDF library, 
> but I can't find a list. Standard PNGs work.
>
>
> Because it uses templates, you can override the relevant file 
> (_titlepage.html.erb) in a plug-in, and make it display whatever you 
> want (such as the logo for your whole organization, if you don't want 
> PDFs branded differently per repository, or no logo at all if you just 
> want text.) But it also contains code to add the other things on the 
> first page, so if you override it you might have to update it when 
> upgrading to a future release.
>
>
> Andrew.
>
>
>
> On 05/06/2020 16:44, Blake Carver wrote:
>>
>> I was just typing out a reply to say the same thing, here's a PR that 
>> gives you a decent idea of some of the files that are used on the PUI 
>> side PDF
>> https://github.com/archivesspace/archivesspace/pull/1480
>> It's not an area that you want to mess with, usually.
>> ------------------------------------------------------------------------
>> *From:* archivesspace_users_group-bounces at lyralists.lyrasis.org 
>> <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf 
>> of Majewski, Steven Dennis (sdm7g) <sdm7g at virginia.edu>
>> *Sent:* Friday, June 5, 2020 10:58 AM
>> *To:* Archivesspace Users Group 
>> <archivesspace_users_group at lyralists.lyrasis.org>
>> *Subject:* Re: [Archivesspace_Users_Group] PDF Export Logo Issue
>> That style sheet is only used in the staff PDF export.
>> The PUI PDF is generated differently.
>>
>>
>> Sent from my iPad
>>
>>> On Jun 5, 2020, at 10:02 AM, Chris Mayo <mayoc at bc.edu> wrote:
>>>
>>> 
>>> Hi Bailey,
>>>
>>> My institution doesn't use the PUI, so I can't really speculate 
>>> about why there's a difference between the staff and public 
>>> interfaces. That being said, the appearance of the PDFs are 
>>> controlled by the as-ead-pdf.xsl stylesheet, and I've noticed in the 
>>> past that it's really easy for the logos to break for a number of 
>>> reasons:
>>>
>>>   * if the logo file gets renamed or goes missing during a software
>>>     update
>>>   * if you're modifying the stylesheet for other reasons and
>>>     accidentally comment out, delete, or modify the part that calls
>>>     for the logo file
>>>
>>> I don't know if either of those is the case in your application, but 
>>> I'd start with looking at the stylesheet and logo files and making 
>>> sure they're all cross-referencing properly.
>>>
>>> Best,
>>> Chris
>>>
>>> On Thu, Jun 4, 2020 at 11:37 AM Hoffner, Bailey E. <baileys at ou.edu 
>>> <mailto:baileys at ou.edu>> wrote:
>>>
>>>     Morning All,
>>>
>>>     We have an odd issue where our branding image does not show up
>>>     on the PDF that can be exported from the public interface, but
>>>     it does show up on the PDF that can be exported from the staff
>>>     interface. The ArchivesSpace logo no longer shows up, but
>>>     neither does the branding image.
>>>
>>>     Any suggestions? Has anyone had an issue like this before?
>>>
>>>     Thanks!
>>>
>>>     -Bailey
>>>
>>>     Bailey Hoffner, MLIS
>>>
>>>     Metadata and Collections Management Archivist
>>>
>>>     University of Oklahoma Libraries
>>>
>>>     405-325-1566
>>>
>>>     _______________________________________________
>>>     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
>>>
>>>
>>>
>>> -- 
>>> Chris Mayo
>>> Digital Production Librarian
>>> Boston College
>>> chris.mayo at bc.edu <mailto:chris.mayo at bc.edu>
>>> pronouns: they/them/theirs
>>> _______________________________________________
>>> Archivesspace_Users_Group mailing list
>>> Archivesspace_Users_Group at lyralists.lyrasis.org
>>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>>
>> _______________________________________________
>> Archivesspace_Users_Group mailing list
>> Archivesspace_Users_Group at lyralists.lyrasis.org
>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
> _______________________________________________
> 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/20200605/d11de561/attachment.html>


More information about the Archivesspace_Users_Group mailing list