Module com.github.librepdf.openpdf
Package org.openpdf.text.pdf
Record Class PdfBatchUtils.WatermarkJob
java.lang.Object
java.lang.Record
org.openpdf.text.pdf.PdfBatchUtils.WatermarkJob
- Enclosing class:
PdfBatchUtils
public static record PdfBatchUtils.WatermarkJob(Path input, Path output, String text, float fontSize, float opacity)
extends Record
Add a semi-transparent text watermark to all pages.
-
Constructor Summary
ConstructorsConstructorDescriptionWatermarkJob(Path input, Path output, String text, float fontSize, float opacity) Creates an instance of aWatermarkJobrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.floatfontSize()Returns the value of thefontSizerecord component.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.floatopacity()Returns the value of theopacityrecord component.output()Returns the value of theoutputrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WatermarkJob
Creates an instance of aWatermarkJobrecord class.- Parameters:
input- the value for theinputrecord componentoutput- the value for theoutputrecord componenttext- the value for thetextrecord componentfontSize- the value for thefontSizerecord componentopacity- the value for theopacityrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
output
Returns the value of theoutputrecord component.- Returns:
- the value of the
outputrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
fontSize
public float fontSize()Returns the value of thefontSizerecord component.- Returns:
- the value of the
fontSizerecord component
-
opacity
public float opacity()Returns the value of theopacityrecord component.- Returns:
- the value of the
opacityrecord component
-