Skip to main content

Preparing documents for signing

How field placement works in the current version

Doc E Sign currently places the signature field automatically at the bottom of the last page of your document. The full drag-and-drop field placement interface ships in a future release.

This page explains how to structure your PDFs so the signature block lands where you intend.


If you generate PDFs programmatically

The simplest approach is to include a dedicated signature page at the end of your document. Doc E Sign will place the signature field at the bottom of that page.

JavaScript — appending a signature page with pdf-lib

import { PDFDocument, StandardFonts, rgb } from 'pdf-lib';
import { readFileSync, writeFileSync } from 'fs';

async function appendSignaturePage(inputPath, outputPath) {
const existingBytes = readFileSync(inputPath);
const doc = await PDFDocument.load(existingBytes);
const helvetica = await doc.embedFont(StandardFonts.Helvetica);

const page = doc.addPage();
const { width, height } = page.getSize();

page.drawText('Signature', {
x: 50,
y: height - 100,
size: 14,
font: helvetica,
color: rgb(0, 0, 0),
});

page.drawLine({
start: { x: 50, y: height - 160 },
end: { x: 300, y: height - 160 },
thickness: 1,
color: rgb(0.4, 0.4, 0.4),
});

page.drawText('Name:', {
x: 50,
y: height - 180,
size: 10,
font: helvetica,
color: rgb(0.4, 0.4, 0.4),
});

page.drawText('Date:', {
x: 50,
y: height - 200,
size: 10,
font: helvetica,
color: rgb(0.4, 0.4, 0.4),
});

const bytes = await doc.save();
writeFileSync(outputPath, bytes);
}

Python — appending a signature page with reportlab and pypdf

import io
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from pypdf import PdfWriter, PdfReader


def create_signature_page() -> bytes:
buf = io.BytesIO()
c = canvas.Canvas(buf, pagesize=A4)
width, height = A4

c.setFont("Helvetica", 14)
c.drawString(50, height - 100, "Signature")

c.setStrokeColorRGB(0.4, 0.4, 0.4)
c.line(50, height - 160, 300, height - 160)

c.setFont("Helvetica", 10)
c.setFillColorRGB(0.4, 0.4, 0.4)
c.drawString(50, height - 180, "Name:")
c.drawString(50, height - 200, "Date:")

c.save()
return buf.getvalue()


def append_signature_page(input_path: str, output_path: str) -> None:
writer = PdfWriter()

with open(input_path, 'rb') as f:
reader = PdfReader(f)
for page in reader.pages:
writer.add_page(page)

sig_page_bytes = create_signature_page()
sig_reader = PdfReader(io.BytesIO(sig_page_bytes))
writer.add_page(sig_reader.pages[0])

with open(output_path, 'wb') as f:
writer.write(f)

Python — reordering pages so the signature block is last

If your document already has a signature block page but it is not the last page, move it:

from pypdf import PdfWriter, PdfReader


def move_page_to_last(input_path: str, output_path: str, signature_page_index: int) -> None:
writer = PdfWriter()

with open(input_path, 'rb') as f:
reader = PdfReader(f)
pages = list(reader.pages)

signature_page = pages.pop(signature_page_index)
pages.append(signature_page)

for page in pages:
writer.add_page(page)

with open(output_path, 'wb') as f:
writer.write(f)

# Example: move page at index 0 (the first page) to the last position
move_page_to_last('contract.pdf', 'contract-ready.pdf', signature_page_index=0)

If you use existing PDF documents

Open your document in a PDF editor and move the signature block to the last page before uploading.

Word / Google Docs: Cut the signature section, paste it at the end of the document, then export to PDF.

Adobe Acrobat: Use Organise Pages to drag the signature page to the last position. Save as PDF.

macOS Preview: Open the PDF, use the sidebar to drag the signature page to the last position.


What Doc E Sign strips from your PDF

For security, Doc E Sign removes the following from every uploaded PDF before storing it:

  • Embedded scripts (JavaScript in PDFs)
  • Embedded file attachments

The following are preserved:

  • Document text, images, and layout
  • Metadata (author, creation date, title)
  • Hyperlinks and form field definitions (fields are not filled — they are preserved as-is)

Note: The Original document fingerprint (Hash 1) is computed from the stored, sanitised version of your PDF — not the raw upload. If your PDF contained scripts or attachments that were removed, the fingerprint reflects the cleaned version.

This page is linked from the dashboard confirmation modal so you can find it quickly if you need to adjust your document structure.