mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Review findings
This commit is contained in:

committed by
Kim Shepherd

parent
7b04a1eb2f
commit
81c5ec868d
@@ -516,10 +516,6 @@
|
|||||||
<groupId>org.apache.pdfbox</groupId>
|
<groupId>org.apache.pdfbox</groupId>
|
||||||
<artifactId>pdfbox</artifactId>
|
<artifactId>pdfbox</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.pdfbox</groupId>
|
|
||||||
<artifactId>fontbox</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ibm.icu</groupId>
|
<groupId>com.ibm.icu</groupId>
|
||||||
<artifactId>icu4j</artifactId>
|
<artifactId>icu4j</artifactId>
|
||||||
|
@@ -221,7 +221,7 @@ public class CitationDocumentServiceImpl implements CitationDocumentService, Ini
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If previous logic didn't return true, then we're false.
|
// If previous logic didn't return true, then we're false.
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -45,7 +45,9 @@ public class CoverPageService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Render a PDF coverpage for the given Item. The implementation may use the context and
|
* Render a PDF coverpage for the given Item. The implementation may use the context and
|
||||||
* any relevant meta data from the Item to populuate dynamic content in the rendered page.
|
* any relevant meta data from the Item to populate dynamic content in the rendered page.
|
||||||
|
* All metadata fields (using format schema_field_qualifier) are passed to coverPageContributor
|
||||||
|
* and can be referenced in HTML template
|
||||||
*
|
*
|
||||||
* @param item the current item
|
* @param item the current item
|
||||||
* @return a PDDocument containing the rendered coverpage.
|
* @return a PDDocument containing the rendered coverpage.
|
||||||
@@ -58,7 +60,7 @@ public class CoverPageService {
|
|||||||
// The contributor allows to calculate additional parameters for the template or to replace existing ones.
|
// The contributor allows to calculate additional parameters for the template or to replace existing ones.
|
||||||
parameters = coverPageContributor.processCoverPageParams(item, parameters);
|
parameters = coverPageContributor.processCoverPageParams(item, parameters);
|
||||||
|
|
||||||
LOG.info("Rendering cover document with params = {}", parameters);
|
LOG.debug("Rendering cover document with params = {}", parameters);
|
||||||
|
|
||||||
var html = pdfGenerator.parseThymeleafTemplate(coverTemplate, parameters);
|
var html = pdfGenerator.parseThymeleafTemplate(coverTemplate, parameters);
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ public class DefaultCoverPageContributor implements CoverPageContributor {
|
|||||||
if (StringUtils.isBlank(dcTitleSubtitle)) {
|
if (StringUtils.isBlank(dcTitleSubtitle)) {
|
||||||
parameters.put("metadata_title", dcTitle);
|
parameters.put("metadata_title", dcTitle);
|
||||||
} else {
|
} else {
|
||||||
parameters.put("metadata_title", "%s: %s".formatted(dcTitle, dcTitleSubtitle));
|
parameters.put("metadata_title", String.format("%s: %s", dcTitle, dcTitleSubtitle));
|
||||||
}
|
}
|
||||||
|
|
||||||
// join authors to list
|
// join authors to list
|
||||||
|
@@ -14,6 +14,11 @@
|
|||||||
|
|
||||||
<!-- only limited subset of CSS v3 features are supported. Be careful to check the rendered result! -->
|
<!-- only limited subset of CSS v3 features are supported. Be careful to check the rendered result! -->
|
||||||
<style>
|
<style>
|
||||||
|
/* check the documentation for details how to configure the page size
|
||||||
|
https://flyingsaucerproject.github.io/flyingsaucer/r8/guide/users-guide-R8.html#xil_34
|
||||||
|
*/
|
||||||
|
@page { size: A4 }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: white;
|
background: white;
|
||||||
height: 100%; /* Ensure the html and body are full height */
|
height: 100%; /* Ensure the html and body are full height */
|
||||||
@@ -101,6 +106,7 @@
|
|||||||
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
|
<!-- The metadata fields from the current item can be referenced here in the format schema_field_qualifier -->
|
||||||
<div class="title" th:text="${metadata_title}">Test title</div>
|
<div class="title" th:text="${metadata_title}">Test title</div>
|
||||||
|
|
||||||
<div class="author" th:text="${metadata_author}">Autor 1; Author 2; Author 3</div>
|
<div class="author" th:text="${metadata_author}">Autor 1; Author 2; Author 3</div>
|
||||||
|
@@ -22,22 +22,5 @@
|
|||||||
|
|
||||||
# Customize the text/appearance of the citation PDF
|
# Customize the text/appearance of the citation PDF
|
||||||
|
|
||||||
# Citation page format, either LETTER or A4
|
#Name of the cover page template (is loaded as resource)
|
||||||
#default => LETTER
|
#citation-page.cover-template=dspace_coverpage
|
||||||
#citation-page.page_format = LETTER
|
|
||||||
|
|
||||||
# First row of header, perhaps put your institution/university name
|
|
||||||
# A comma separator will create a header with multiple sections on one line.
|
|
||||||
#citation-page.header1=DSpace Institution
|
|
||||||
|
|
||||||
# Second row of header, perhaps put your DSpace branded name, and url to your DSpace
|
|
||||||
# A comma separator will create a header with multiple sections on one line.
|
|
||||||
#citation-page.header2=DSpace Repository,http://dspace.org
|
|
||||||
|
|
||||||
# Metadata fields to display on the citation PDF.
|
|
||||||
# Specify in schema.element.qualifier form, and separate fields by commas. If you want a horizontal line, use _line_
|
|
||||||
#citation-page.fields=dc.date.issued,dc.title,dc.creator,dc.contributor.author,dc.publisher,_line_,dc.identifier.citation,dc.identifier.uri
|
|
||||||
|
|
||||||
# Footer text, either some type of license/copyright info, or just letting them know where they got the document from.
|
|
||||||
# Any commas in this footer should be escaped (\,)
|
|
||||||
#citation-page.footer=Downloaded from DSpace Repository\, DSpace Institution's institutional repository
|
|
||||||
|
Reference in New Issue
Block a user