Label
Menu
Products
PDF REST API
Image REST API
Signature REST API
Features
Integrations
Pricing
API Reference
Guides
PDF Tools
Image Tools
Signature
Contact
Login
Register
Signature REST API Guides
Welcome
Getting Started
Error handling
Examples
Basic
Advanced
Manage
Signature PDF Guide
Follow this guide to create a signature request with only one signer and use the default settings.
Basic Signature PDF
The code example below shows you how to create a signature request for one signer.
Basic Send to sign PDF
PHP
Net.
Ruby
Node.js
use Ilovepdf\SignTask; use Ilovepdf\Sign\Receivers\Signer; use Ilovepdf\Sign\Elements\ElementSignature; $signTask = new SignTask("project_public_key", "private_secret_key"); // We first upload the file that we are going to use $file = $signTask->addFile('/path/to/file'); // Add signers and their elements; $signatureElement = new ElementSignature(); $signatureElement->setPosition(20, -20) ->setPages("1") ->setSize(40); // Create a signer $signer = new Signer("name","signer@email.com"); // Assign the signer an element to be signed $signer->addElements($file, $signatureElement); $signTask->addReceiver($signer); $signature = $signTask->execute()->result;
// UNDER CONSTRUCTION
require "bundler/setup" require 'ilovepdf' # You can call task class directly my_task = Ilovepdf::Tool::Signature.new(pub_key, priv_key) # File object keeps information about its server_filename and the properties you can set file = my_task.add_file '/path/to/file/sample.pdf' signer = Ilovepdf::Signature::Receiver.new(:signer,'name','email@email.com') signature_element = Ilovepdf::Signature::SignatureElement.new(file) signature_element.set_position(x: 20,y: -20) signature_element.pages = "1" signature_element.size = 40 signer << signature_element body = my_task.send_to_sign.body
import ILovePDFApi from '@ilovepdf/ilovepdf-nodejs'; import ILovePDFFile from '@ilovepdf/ilovepdf-nodejs/ILovePDFFile'; import SignTask from '@ilovepdf/ilovepdf-js-core/tasks/sign/SignTask'; import SignatureFile from '@ilovepdf/ilovepdf-js-core/tasks/sign/elements/SignatureFile'; import Signer from '@ilovepdf/ilovepdf-js-core/tasks/sign/receivers/Signer'; const api = new ILovePDFApi(process.env.PUBLIC_KEY!, process.env.SECRET_KEY!); const task = api.newTask('sign') as SignTask; task.start() .then(() => { const file = new ILovePDFFile('
'); return task.addFile(file); }) .then(file => { const signatureFile = new SignatureFile(file, [{ type: 'signature', position: '300 -100', pages: '1', size: 28, }]); return signatureFile; }) .then(signatureFile => { const signer = new Signer('Diego Signer', 'invent@ado.com'); signer.addFile(signatureFile); task.addReceiver(signer); }) .then(() => { return task.process(); }) .then(response => { console.log(response); });