Package com.pdfgate

Class WatermarkPdfParams

java.lang.Object
com.pdfgate.WatermarkPdfParams

public final class WatermarkPdfParams extends Object
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.

  • Method Details

    • builder

      public static WatermarkPdfParams.Builder builder()
      Creates a new builder for watermark PDF parameters.
      Returns:
      the builder for watermark PDF parameters.
    • getDocumentId

      public String getDocumentId()
      Returns the document id when watermarking by document id.
      Returns:
      the document id when watermarking by document id.
    • getWatermark

      public FileParam 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

      public String getText()
      Returns the watermark text.
      Returns:
      the watermark text.
    • getFont

      public String getFont()
      Returns the text font name.
      Returns:
      the text font name.
    • getFontSize

      public Integer getFontSize()
      Returns the text font size.
      Returns:
      the text font size.
    • getFontColor

      public String getFontColor()
      Returns the text font color.
      Returns:
      the text font color.
    • getOpacity

      public Double getOpacity()
      Returns the watermark opacity.
      Returns:
      the watermark opacity.
    • getXPosition

      public Integer getXPosition()
      Returns the watermark horizontal position.
      Returns:
      the watermark horizontal position.
    • getYPosition

      public Integer getYPosition()
      Returns the watermark vertical position.
      Returns:
      the watermark vertical position.
    • getImageWidth

      public Integer getImageWidth()
      Returns the watermark image width.
      Returns:
      the watermark image width.
    • getImageHeight

      public Integer getImageHeight()
      Returns the watermark image height.
      Returns:
      the watermark image height.
    • getRotate

      public Double getRotate()
      Returns the watermark rotation in degrees.
      Returns:
      the watermark rotation in degrees.
    • getJsonResponse

      public Boolean 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

      public Long getPreSignedUrlExpiresIn()
      Returns the pre-signed URL expiration time in seconds.
      Returns:
      the pre-signed URL expiration time in seconds.
    • getMetadata

      public Object getMetadata()
      Returns metadata to attach to the document.
      Returns:
      metadata to attach to the document.