Package com.pdfgate
Class WatermarkPdfParams
java.lang.Object
com.pdfgate.WatermarkPdfParams
Parameters for watermarking a PDF by document ID.
type is required. For text watermarks, set text. For image
watermarks, provide a watermark image file. Optional settings include
font, size, color, opacity, position, and rotation. Responses are JSON-only.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forWatermarkPdfParams.static enumWatermark type supported by the API. -
Method Summary
Modifier and TypeMethodDescriptionstatic WatermarkPdfParams.Builderbuilder()Creates a new builder for watermark PDF parameters.Returns the document id when watermarking by document id.getFont()Returns the text font name.Returns the text font color.Returns the text font size.Returns the watermark image height.Returns the watermark image width.Returns whether the response is JSON.Returns metadata to attach to the document.Returns the watermark opacity.Returns the pre-signed URL expiration time in seconds.Returns the watermark rotation in degrees.getText()Returns the watermark text.getType()Returns the watermark type.Returns the watermark image payload when watermarking with an image.Returns the watermark horizontal position.Returns the watermark vertical position.booleanReturns whether the response is JSON.
-
Method Details
-
builder
Creates a new builder for watermark PDF parameters.- Returns:
- the builder for watermark PDF parameters.
-
getDocumentId
Returns the document id when watermarking by document id.- Returns:
- the document id when watermarking by document id.
-
getWatermark
Returns the watermark image payload when watermarking with an image.- Returns:
- the watermark image payload when watermarking with an image.
-
getType
Returns the watermark type.- Returns:
- the watermark type.
-
getText
Returns the watermark text.- Returns:
- the watermark text.
-
getFont
Returns the text font name.- Returns:
- the text font name.
-
getFontSize
Returns the text font size.- Returns:
- the text font size.
-
getFontColor
Returns the text font color.- Returns:
- the text font color.
-
getOpacity
Returns the watermark opacity.- Returns:
- the watermark opacity.
-
getXPosition
Returns the watermark horizontal position.- Returns:
- the watermark horizontal position.
-
getYPosition
Returns the watermark vertical position.- Returns:
- the watermark vertical position.
-
getImageWidth
Returns the watermark image width.- Returns:
- the watermark image width.
-
getImageHeight
Returns the watermark image height.- Returns:
- the watermark image height.
-
getRotate
Returns the watermark rotation in degrees.- Returns:
- the watermark rotation in degrees.
-
getJsonResponse
Returns whether the response is JSON.- Returns:
- whether the response is JSON.
-
isJsonResponse
public boolean isJsonResponse()Returns whether the response is JSON.- Returns:
- whether the response is JSON.
-
getPreSignedUrlExpiresIn
Returns the pre-signed URL expiration time in seconds.- Returns:
- the pre-signed URL expiration time in seconds.
-
getMetadata
Returns metadata to attach to the document.- Returns:
- metadata to attach to the document.
-