[Archivesspace_Users_Group] Customizing the Public Interface PDF
Custer, Mark
mark.custer at yale.edu
Wed Aug 30 13:36:49 EDT 2017
Steve,
Thanks so much for including information about the Java libraries that this new process that the PUI uses, as well as that link to that flying saucer user's guide (it looks like that could be helpful in figuring out how much of CSS3, etc., is supported for creating the PDFs!).
Mark
________________________________
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: Wednesday, August 30, 2017 1:09:30 PM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] Customizing the Public Interface PDF
The public interface PDF generation appears to be a completely different method from the FOP/xsl based PDF generator in the staff interface.
Staff PDF generation: EAD.xml + FOP.xsl -> FOP.xml + [fop-processor] -> PDF
The public interface PDF generator is using Java libraries common/lib/core-renderer.jar and common/lib/itext-2.1.7.js2.jar which is generating PDF from XHTML + CSS .
So I believe you would want to customize the ERB html templates in:
https://github.com/archivesspace/archivesspace/tree/master/public/app/views/pdf<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_tree_master_public_app_views_pdf&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=EhH7wNHvmgk9c3UXyansSwAjjl0zm0RsPnIBtStEPr4&e=>
I haven't attempted this myself yet, but I would imagine you could override those templates by putting customized copies in plugins/local/public/views/
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_tree_master_public_app_views_pdf&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=EhH7wNHvmgk9c3UXyansSwAjjl0zm0RsPnIBtStEPr4&e=>
[https://avatars0.githubusercontent.com/u/1311559?v=4&s=400]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_tree_master_public_app_views_pdf&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=EhH7wNHvmgk9c3UXyansSwAjjl0zm0RsPnIBtStEPr4&e=>
archivesspace/archivesspace<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_tree_master_public_app_views_pdf&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=EhH7wNHvmgk9c3UXyansSwAjjl0zm0RsPnIBtStEPr4&e=>
github.com
archivesspace - The ArchivesSpace archives management tool
See also:
https://github.com/archivesspace/archivesspace/blob/master/public/app/controllers/pdf_controller.rb<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_public_app_controllers_pdf-5Fcontroller.rb&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=mpUA9XUgaRt_CLvyqBbIRrflfrxRHlflipG_HQE5lfU&e=>
[https://avatars0.githubusercontent.com/u/1311559?v=4&s=400]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_public_app_controllers_pdf-5Fcontroller.rb&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=mpUA9XUgaRt_CLvyqBbIRrflfrxRHlflipG_HQE5lfU&e=>
archivesspace/archivesspace<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_public_app_controllers_pdf-5Fcontroller.rb&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=mpUA9XUgaRt_CLvyqBbIRrflfrxRHlflipG_HQE5lfU&e=>
github.com
archivesspace - The ArchivesSpace archives management tool
https://github.com/archivesspace/archivesspace/blob/master/public/app/models/finding_aid_pdf.rb<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_public_app_models_finding-5Faid-5Fpdf.rb&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=q8AhHO8pq9FDvCfmgDBhb7QSgnzX7N3NeOSCG6w4V4E&e=>
[https://avatars0.githubusercontent.com/u/1311559?v=4&s=400]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_public_app_models_finding-5Faid-5Fpdf.rb&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=q8AhHO8pq9FDvCfmgDBhb7QSgnzX7N3NeOSCG6w4V4E&e=>
archivesspace/archivesspace<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_public_app_models_finding-5Faid-5Fpdf.rb&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=q8AhHO8pq9FDvCfmgDBhb7QSgnzX7N3NeOSCG6w4V4E&e=>
github.com
archivesspace - The ArchivesSpace archives management tool
And:
https://flyingsaucerproject.github.io/flyingsaucer/r8/guide/users-guide-R8.html#pdf<https://urldefense.proofpoint.com/v2/url?u=https-3A__flyingsaucerproject.github.io_flyingsaucer_r8_guide_users-2Dguide-2DR8.html-23pdf&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=JiqRy7nqfTtAM77Tl7hlrXXbJmpP54cGU34qjAdgpRc&e=>
The Flying Saucer User's Guide - GitHub Pages<https://urldefense.proofpoint.com/v2/url?u=https-3A__flyingsaucerproject.github.io_flyingsaucer_r8_guide_users-2Dguide-2DR8.html-23pdf&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=JiqRy7nqfTtAM77Tl7hlrXXbJmpP54cGU34qjAdgpRc&e=>
flyingsaucerproject.github.io
The parser is loaded and configured on first use. Normally, we find the default JDK XML parser to work just fine. You may want to alter the XMLReader instance used if ...
<https://urldefense.proofpoint.com/v2/url?u=https-3A__flyingsaucerproject.github.io_flyingsaucer_r8_guide_users-2Dguide-2DR8.html-23pdf&d=DwMF-g&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=Ita0hMqAIhoNSQh7j4IA7l-3eEifJANZDOns9MedHqs&s=JiqRy7nqfTtAM77Tl7hlrXXbJmpP54cGU34qjAdgpRc&e=>
-- Steve Majewski / UVA Alderman Library
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Alice Elizabeth Tippit <a-tippit at northwestern.edu>
Sent: Wednesday, August 30, 2017 11:40:41 AM
To: archivesspace_users_group at lyralists.lyrasis.org
Subject: [Archivesspace_Users_Group] Customizing the Public Interface PDF
Greetings all,
We would like to customize the PDF that generates from the public interface, but are having difficulty figuring out which of the xsl files in the stylesheets folder is used to generate the PDF, and where to place our customized files.
When the “Print” button is clicked in our Public interface, a PDF is automatically generated. In comparison the PDF produced through the staff interface it lacks the useful table of contents and has formatting that produces a document that is twice the number of pages.
Notes from the public interface session held at the ArchivesSpace Forum indicate that we need to customize the as-ead-html.xsl file as a plugin:
>PDF from PUI is NOT generated from EAD-->PDF XSL (comes from HTML) so to customize PDF you would have to use a plugin; PDF on staff side still is from XSL<
Adding to our confusion, when we run the as-ead-html.xsl file through Oxygen the html document produced has a table of contents, and formatting that is easier on the eyes. No idea what it looks like converted into a PDF. I’d hope for something better than the PDF that currently generates on the public site.
Following the note from the public session as best we can, we attempted a test, placing a customized copy of the as-ead-html.xsl file in archivesspace > plugins > local > public > stylesheets. This had no effect.
Are we chasing the wrong file, or placing it in the wrong location? Or something else…
For interested folks, I’ve attached the html file produced by running the as-ead-html.xsl file through Oxygen, as well as the PDFs currently produced on the Public and Staff interface.
Any advice—thank you!
Alice Tippit
Developer-Metadata & Discovery Services
Northwestern University Library
Northwestern University
1970 Campus Drive
Evanston, IL 60208
www.library.northwestern.edu
a-tippit at northwestern.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20170830/51d965ce/attachment.html>
More information about the Archivesspace_Users_Group
mailing list