Class PdfHandler
java.lang.Object
io.goobi.viewer.controller.imaging.PdfHandler
PdfHandler class.
- Author:
- Florian Alpers
-
Constructor Summary
ConstructorsConstructorDescriptionPdfHandler(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 givenStructElementandPhysicalElementgetPdfUrl(StructElement se, PhysicalElement[] pages) Return the pdf-download url for the givenStructElementand a number ofPhysicalElementsgetPdfUrl(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- aWatermarkHandlerobject.configuration- aConfigurationobject.
-
PdfHandler
Constructor for PdfHandler.
- Parameters:
watermarkHandler- aWatermarkHandlerobject.urls-
-
-
Method Details
-
getPdfUrl
Return the pdf-download url for the givenStructElementandPhysicalElement- Parameters:
doc- aStructElementobject.page- aPhysicalElementobject.- Returns:
- a
Stringobject.
-
getPdfUrl
Return the pdf-download url for the givenStructElementand a number ofPhysicalElements- Parameters:
se- aStructElementobject.pages- an array ofPhysicalElementobjects.- Returns:
- a
Stringobject.
-
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:
doc- aStructElementobject.label- The name for the output file (.pdf-extension excluded). If this is null or empty, the label will be generated from pi and divId- Returns:
- a
Stringobject. - 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:
doc- aStructElementobject.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 divId- Returns:
- a
Stringobject. - 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
-