Class PdfHandler
java.lang.Object
io.goobi.viewer.controller.imaging.PdfHandler
PdfHandler class.
- Author:
- Florian Alpers
-
Constructor Summary
ConstructorDescriptionPdfHandler
(WatermarkHandler watermarkHandler, AbstractApiUrlManager urls) Constructor for PdfHandler.PdfHandler
(WatermarkHandler watermarkHandler, Configuration configuration) Constructor for PdfHandler. -
Method Summary
Modifier and TypeMethodDescriptiongetPdfUrl
(StructElement doc, PhysicalElement page) Return the pdf-download url for the givenStructElement
andPhysicalElement
getPdfUrl
(StructElement se, PhysicalElement[] pages) Return the pdf-download url for the givenStructElement
and a number ofPhysicalElement
sgetPdfUrl
(StructElement doc, String label) Gets the url to the pdf for the givenStructElement
.getPdfUrl
(StructElement doc, String pi, String label) Gets the url to the pdf for the given pi and divIdReturns an existing pdf file from the media folderReturns the url to a PDF build from the mets file for the givenpi
-
Constructor Details
-
PdfHandler
Constructor for PdfHandler.
- Parameters:
watermarkHandler
- aWatermarkHandler
object.configuration
- aConfiguration
object.
-
PdfHandler
Constructor for PdfHandler.
- Parameters:
watermarkHandler
- aWatermarkHandler
object.urls
-
-
-
Method Details
-
getPdfUrl
Return the pdf-download url for the givenStructElement
andPhysicalElement
- Parameters:
doc
- aStructElement
object.page
- aPhysicalElement
object.- Returns:
- a
String
object.
-
getPdfUrl
Return the pdf-download url for the givenStructElement
and a number ofPhysicalElement
s- Parameters:
se
- aStructElement
object.pages
- an array ofPhysicalElement
objects.- Returns:
- a
String
object.
-
getPdfUrl
Returns an existing pdf file from the media folder -
getPdfUrl
public String getPdfUrl(StructElement doc, String label) throws PresentationException, IndexUnreachableException Gets the url to the pdf for the givenStructElement
. The pi is the one of the topStruct element of the given StructElement- Parameters:
label
- The name for the output file (.pdf-extension excluded). If this is null or empty, the label will be generated from pi and divIddoc
- aStructElement
object.- Returns:
- a
String
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.
-
getPdfUrl
public String getPdfUrl(StructElement doc, String pi, String label) throws PresentationException, IndexUnreachableException Gets the url to the pdf for the given pi and divId- Parameters:
pi
- PI of the process from which to build pdf. Must be providedlabel
- The name for the output file (.pdf-extension excluded). If this is null or empty, the label will be generated from pi and divIddoc
- aStructElement
object.- Returns:
- a
String
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.
-
getPdfUrl
Returns the url to a PDF build from the mets file for the givenpi
-
getWatermarkHandler
- Returns:
- the watermarkHandler
-