Overlay Watermark PDF using Ruby
Overlay your PDF with Watermark
Try it Free SDK libraryAdd PDF Watermark using PDF Page Overlay easily with Overlay Watermark PDF Ruby SDK.
ConvertAPI provides a Ruby Gem that allows you to perform a Overlay Watermark PDF conversion with just a few lines of code. First, install the ConvertAPI Ruby SDK:
gem 'convert_api'
You can obtain your secret key by signing up for a free account. Once you sign up, you'll receive 250 free conversions instantly! Grab your authentication secret from the account dashboard, and authenticate the ConvertAPI Ruby library like this:
ConvertApi.configure do |config|
config.api_credentials = 'secret_or_token'
end
Once you have your authentication in place, simply copy-paste this pdf to watermark-overlay conversion code snippet into your Ruby project:
You can try out advanced conversion parameters and test the conversion result online using our interactive demo tool. This tool will produce the same conversion output as if you were using the library from your solution, and it will auto-generate the code snippet for you!
Try for FREE!Sets the password to open protected documents.
Set page range. Example 1-10 or 1,2,5.
Specifies the PDF file to use as overlay. Value can be URL or file content.
Specifies the page to use as overlay from the OverlayFile file.
Specifies the watermark scale in percent.
Specifies watermark opacity level.
Specifies watermark style, stamp or watermark. The stamp is placed over page content and watermark under page content.
Values: stamp watermark
Specifies the web address to go when the watermark is clicked.
Specifies the page number to go when the watermark is clicked.
Specifies whether to use the page rotation parameter when placing watermark.
Specifies the horizontal watermark alignment.
Values: left center right
Specifies the vertical watermark alignment.
Values: top center bottom
Specifies the watermark X coordinate. If set overrides property HorizontalAlignment.
Specifies the watermark Y coordinate. If set overrides property VerticalAlignment.
Specifies measurement unit to use for the PositionX and PositionY properties.
Values: pt in mm cm
We ensure that all document processing is handled securely in the cloud, adhering to industry-leading standards like ISO 27001, GDPR, and HIPAA. To enhance security even further, we can ensure that no files or data are stored on our servers and never leave your country.
Learn more about security