Dataset Viewer
Auto-converted to Parquet Duplicate
document
stringlengths
28
41
page
int64
1
24
role
stringclasses
3 values
label
stringclasses
7 values
page_rotate
int64
0
270
mediabox
stringclasses
8 values
cropbox
stringclasses
2 values
display_width_pt
int64
595
842
display_height_pt
int64
420
1.01k
box_x_pt
float64
54
668
box_y_pt
float64
344
914
box_w_pt
float64
70
201
box_h_pt
float64
34
58.8
box_x_rel
float64
0.06
0.84
box_y_rel
float64
0.79
0.91
box_w_rel
float64
0.09
0.34
box_h_rel
float64
0.03
0.09
pdf_x0
float64
54
668
pdf_y0
float64
40
748
pdf_x1
float64
94
788
pdf_y1
float64
76
878
form_field
stringclasses
2 values
case
stringlengths
11
77
signed_reference
stringlengths
25
38
documents/01_letter_portrait.pdf
1
signature
Sign here
0
0 0 612 792
null
612
792
358
676
200
56
0.585
0.8535
0.3268
0.0707
358
60
558
116
null
baseline: US Letter, no rotation
signed/01_letter_portrait.pdf
documents/01_letter_portrait.pdf
1
date
Date
0
0 0 612 792
null
612
792
54
698
120
34
0.0882
0.8813
0.1961
0.0429
54
60
174
94
null
baseline: US Letter, no rotation
signed/01_letter_portrait.pdf
documents/02_a4_portrait.pdf
1
signature
Sign here
0
0 0 595 842
null
595
842
341
726
200
56
0.5731
0.8622
0.3361
0.0665
341
60
541
116
null
baseline: A4, no rotation
signed/02_a4_portrait.pdf
documents/02_a4_portrait.pdf
1
date
Date
0
0 0 595 842
null
595
842
54
748
120
34
0.0908
0.8884
0.2017
0.0404
54
60
174
94
null
baseline: A4, no rotation
signed/02_a4_portrait.pdf
documents/03_legal_portrait.pdf
1
signature
Sign here
0
0 0 612 1008
null
612
1,008
358
892
200
56
0.585
0.8849
0.3268
0.0556
358
60
558
116
null
tall page: US Legal 612x1008
signed/03_legal_portrait.pdf
documents/03_legal_portrait.pdf
1
date
Date
0
0 0 612 1008
null
612
1,008
54
914
120
34
0.0882
0.9067
0.1961
0.0337
54
60
174
94
null
tall page: US Legal 612x1008
signed/03_legal_portrait.pdf
documents/04_a4_landscape_mediabox.pdf
1
signature
Sign here
0
0 0 842 595
null
842
595
588
479
200
56
0.6983
0.805
0.2375
0.0941
588
60
788
116
null
landscape by MediaBox width, Rotate 0
signed/04_a4_landscape_mediabox.pdf
documents/04_a4_landscape_mediabox.pdf
1
date
Date
0
0 0 842 595
null
842
595
54
501
120
34
0.0641
0.842
0.1425
0.0571
54
60
174
94
null
landscape by MediaBox width, Rotate 0
signed/04_a4_landscape_mediabox.pdf
documents/05_a4_rotate90.pdf
1
signature
Sign here
90
0 0 595 842
null
842
595
588
479
200
56
0.6983
0.805
0.2375
0.0941
479
588
535
788
null
portrait MediaBox shown as landscape by /Rotate 90
signed/05_a4_rotate90.pdf
documents/05_a4_rotate90.pdf
1
date
Date
90
0 0 595 842
null
842
595
54
501
120
34
0.0641
0.842
0.1425
0.0571
501
54
535
174
null
portrait MediaBox shown as landscape by /Rotate 90
signed/05_a4_rotate90.pdf
documents/06_a4_rotate180.pdf
1
signature
Sign here
180
0 0 595 842
null
595
842
341
726
200
56
0.5731
0.8622
0.3361
0.0665
54
726
254
782
null
page stored upside down, /Rotate 180
signed/06_a4_rotate180.pdf
documents/06_a4_rotate180.pdf
1
date
Date
180
0 0 595 842
null
595
842
54
748
120
34
0.0908
0.8884
0.2017
0.0404
421
748
541
782
null
page stored upside down, /Rotate 180
signed/06_a4_rotate180.pdf
documents/07_a4_rotate270.pdf
1
signature
Sign here
270
0 0 595 842
null
842
595
588
479
200
56
0.6983
0.805
0.2375
0.0941
60
54
116
254
null
/Rotate 270
signed/07_a4_rotate270.pdf
documents/07_a4_rotate270.pdf
1
date
Date
270
0 0 595 842
null
842
595
54
501
120
34
0.0641
0.842
0.1425
0.0571
60
668
94
788
null
/Rotate 270
signed/07_a4_rotate270.pdf
documents/08_offset_mediabox.pdf
1
signature
Sign here
0
200 300 795 1142
null
595
842
341
726
200
56
0.5731
0.8622
0.3361
0.0665
541
360
741
416
null
MediaBox does not start at 0,0: [200 300 795 1142]
signed/08_offset_mediabox.pdf
documents/08_offset_mediabox.pdf
1
date
Date
0
200 300 795 1142
null
595
842
54
748
120
34
0.0908
0.8884
0.2017
0.0404
254
360
374
394
null
MediaBox does not start at 0,0: [200 300 795 1142]
signed/08_offset_mediabox.pdf
documents/09_cropbox_inside_a3.pdf
1
signature
Sign here
0
0 0 842 1191
120 180 715 1022
595
842
341
726
200
56
0.5731
0.8622
0.3361
0.0665
461
240
661
296
null
A3 MediaBox, visible area is an A4 CropBox at offset 120,180
signed/09_cropbox_inside_a3.pdf
documents/09_cropbox_inside_a3.pdf
1
date
Date
0
0 0 842 1191
120 180 715 1022
595
842
54
748
120
34
0.0908
0.8884
0.2017
0.0404
174
240
294
274
null
A3 MediaBox, visible area is an A4 CropBox at offset 120,180
signed/09_cropbox_inside_a3.pdf
documents/10_cropbox_rotate90.pdf
1
signature
Sign here
90
0 0 842 1191
60 90 655 932
842
595
588
479
200
56
0.6983
0.805
0.2375
0.0941
539
678
595
878
null
CropBox offset and /Rotate 90 together
signed/10_cropbox_rotate90.pdf
documents/10_cropbox_rotate90.pdf
1
date
Date
90
0 0 842 1191
60 90 655 932
842
595
54
501
120
34
0.0641
0.842
0.1425
0.0571
561
144
595
264
null
CropBox offset and /Rotate 90 together
signed/10_cropbox_rotate90.pdf
documents/11_inherited_rotate.pdf
1
signature
Sign here
90
0 0 595 842
null
842
595
588
479
200
56
0.6983
0.805
0.2375
0.0941
479
588
535
788
null
/Rotate 90 and MediaBox set on the Pages tree node, not on the page
signed/11_inherited_rotate.pdf
documents/11_inherited_rotate.pdf
1
date
Date
90
0 0 595 842
null
842
595
54
501
120
34
0.0641
0.842
0.1425
0.0571
501
54
535
174
null
/Rotate 90 and MediaBox set on the Pages tree node, not on the page
signed/11_inherited_rotate.pdf
documents/12_unbalanced_cm.pdf
1
signature
Sign here
0
0 0 595 842
null
595
842
341
726
200
56
0.5731
0.8622
0.3361
0.0665
341
60
541
116
null
content stream leaves a 0.5 scale CTM active at the end (no q/Q around it)
signed/12_unbalanced_cm.pdf
documents/12_unbalanced_cm.pdf
1
date
Date
0
0 0 595 842
null
595
842
54
748
120
34
0.0908
0.8884
0.2017
0.0404
54
60
174
94
null
content stream leaves a 0.5 scale CTM active at the end (no q/Q around it)
signed/12_unbalanced_cm.pdf
documents/13_mixed_pages.pdf
1
initials
Initials
0
0 0 595 842
null
595
842
471
766
70
36
0.7916
0.9097
0.1176
0.0428
471
40
541
76
null
4 pages: A4, Letter landscape, A5 with /Rotate 90, A4; initials on every page
signed/13_mixed_pages.pdf
documents/13_mixed_pages.pdf
2
initials
Initials
0
0 0 792 612
null
792
612
668
536
70
36
0.8434
0.8758
0.0884
0.0588
668
40
738
76
null
4 pages: A4, Letter landscape, A5 with /Rotate 90, A4; initials on every page
signed/13_mixed_pages.pdf
documents/13_mixed_pages.pdf
3
initials
Initials
90
0 0 420 595
null
595
420
471
344
70
36
0.7916
0.819
0.1176
0.0857
344
471
380
541
null
4 pages: A4, Letter landscape, A5 with /Rotate 90, A4; initials on every page
signed/13_mixed_pages.pdf
documents/13_mixed_pages.pdf
4
signature
Tenant signature
0
0 0 595 842
null
595
842
54
686
200
56
0.0908
0.8147
0.3361
0.0665
54
100
254
156
null
4 pages: A4, Letter landscape, A5 with /Rotate 90, A4; initials on every page
signed/13_mixed_pages.pdf
documents/13_mixed_pages.pdf
4
signature
Landlord signature
0
0 0 595 842
null
595
842
341
686
200
56
0.5731
0.8147
0.3361
0.0665
341
100
541
156
null
4 pages: A4, Letter landscape, A5 with /Rotate 90, A4; initials on every page
signed/13_mixed_pages.pdf
documents/13_mixed_pages.pdf
4
initials
Initials
0
0 0 595 842
null
595
842
471
766
70
36
0.7916
0.9097
0.1176
0.0428
471
40
541
76
null
4 pages: A4, Letter landscape, A5 with /Rotate 90, A4; initials on every page
signed/13_mixed_pages.pdf
documents/14_two_signers.pdf
1
signature
Client signature
0
0 0 612 792
null
612
792
54
626
200
56
0.0882
0.7904
0.3268
0.0707
54
110
254
166
null
two signature boxes and two date boxes on one page
signed/14_two_signers.pdf
documents/14_two_signers.pdf
1
signature
Contractor signature
0
0 0 612 792
null
612
792
358
626
200
56
0.585
0.7904
0.3268
0.0707
358
110
558
166
null
two signature boxes and two date boxes on one page
signed/14_two_signers.pdf
documents/14_two_signers.pdf
1
date
Date
0
0 0 612 792
null
612
792
54
698
120
34
0.0882
0.8813
0.1961
0.0429
54
60
174
94
null
two signature boxes and two date boxes on one page
signed/14_two_signers.pdf
documents/14_two_signers.pdf
1
date
Date
0
0 0 612 792
null
612
792
438
698
120
34
0.7157
0.8813
0.1961
0.0429
438
60
558
94
null
two signature boxes and two date boxes on one page
signed/14_two_signers.pdf
documents/15_long_document.pdf
24
signature
Sign here
0
0 0 595 842
null
595
842
341
726
200
56
0.5731
0.8622
0.3361
0.0665
341
60
541
116
null
24 pages, signature on the last page only
signed/15_long_document.pdf
documents/15_long_document.pdf
24
date
Date
0
0 0 595 842
null
595
842
54
748
120
34
0.0908
0.8884
0.2017
0.0404
54
60
174
94
null
24 pages, signature on the last page only
signed/15_long_document.pdf
documents/16_acroform_signature_field.pdf
1
signature
Sign here
0
0 0 595 842
null
595
842
341
726
200
56
0.5731
0.8622
0.3361
0.0665
341
60
541
116
Signature1
empty /Sig form field plus Name and Date text fields at the boxes
signed/16_acroform_signature_field.pdf
documents/16_acroform_signature_field.pdf
1
date
Date
0
0 0 595 842
null
595
842
54
748
120
34
0.0908
0.8884
0.2017
0.0404
54
60
174
94
Date
empty /Sig form field plus Name and Date text fields at the boxes
signed/16_acroform_signature_field.pdf
documents/17_scanned_form.pdf
1
signature
Sign here
0
0 0 595 842
null
595
842
345.2542
722.5705
200.7624
58.787
0.5803
0.8582
0.3374
0.0698
345.2542
60.6425
546.0166
119.4295
null
image-only page (150 dpi scan, tilted 0.8 degrees), no text layer
signed/17_scanned_form.pdf
documents/17_scanned_form.pdf
1
date
Date
0
0 0 595 842
null
595
842
58.5894
749.6925
120.463
35.6721
0.0985
0.8904
0.2025
0.0424
58.5894
56.6354
179.0524
92.3075
null
image-only page (150 dpi scan, tilted 0.8 degrees), no text layer
signed/17_scanned_form.pdf

PDF Signing Test Documents

17 PDF documents with visible "Sign here", "Date" and "Initials" boxes, built to catch the bugs that make a signature land in the wrong place: rotated pages, MediaBox that does not start at 0,0, CropBox smaller than the page, rotation inherited from the page tree, a content stream that leaves a scaled coordinate system behind, mixed page sizes, a form with an empty signature field and an image-only scanned page. For each of the 40 boxes, boxes.csv gives the position both as the user sees it on screen and in PDF coordinates, and signed/ holds a reference copy of every document with the boxes filled correctly.

There are also 80 signature image files: 12 synthetic signatures and 4 sets of initials, each as transparent PNG, PNG on white, JPEG on white, a JPEG that looks like a photo of paper, and SVG.

Everything was generated by a script. The documents are fictional (a school trip form, a room rental agreement, a freelance contract, an invoice approval). The signatures are procedural pen strokes, not anyone's real handwriting, and they do not spell real names. CC0.

Why this dataset

Placing an image on a PDF page sounds simple until the page is rotated. The click happens in screen coordinates (origin top left, y down, after rotation and cropping), but the PDF wants user space coordinates (origin bottom left, y up, before rotation). Getting that conversion wrong is the most common bug in signing tools, and it only shows on certain files. This set is useful for:

  • Testing a "sign PDF" or "stamp PDF" feature. Put a signature into each box using box_x_pt, box_y_pt, box_w_pt, box_h_pt (screen coordinates in points) and compare your output with signed/. If the signature ends up sideways, upside down, half size or outside the page, the case name tells you which conversion is missing.
  • Unit tests for coordinate conversion. Every row has both systems: screen points and relative values (0..1) on one side, pdf_x0 pdf_y0 pdf_x1 pdf_y1 in PDF user space on the other, plus the page's MediaBox, CropBox and /Rotate. The values were checked with pdf.js (convertToViewportRectangle) for all 80 placements, unsigned and signed.
  • Signature field detection. 16_acroform_signature_field.pdf has an empty /Sig field and a text field at the boxes, so you can check whether a tool finds the field instead of asking the user where to sign.
  • Signature image import. The same signature comes with alpha, on white, as JPEG (no alpha, so the white must be removed) and on paper with a ruled line, uneven light and a slight tilt. signatures.csv has the ink bounding box of each clean image, which is the correct crop.

Layout

boxes.csv                     one row per box (40 rows)
signatures.csv                one row per signature image file (80 rows)
documents/<case>.pdf          unsigned documents
signed/<case>.pdf             the same documents with every box filled correctly
signatures/<variant>/<name>   png_transparent, png_white, jpeg_white, jpeg_scanned, svg
document what makes it tricky
01_letter_portrait, 02_a4_portrait, 03_legal_portrait nothing, these are the baselines (US Letter, A4, US Legal)
04_a4_landscape_mediabox landscape because the MediaBox is wide, /Rotate 0
05_a4_rotate90, 06_a4_rotate180, 07_a4_rotate270 portrait page stored with /Rotate 90, 180, 270
08_offset_mediabox MediaBox [200 300 795 1142], so (0,0) is outside the page
09_cropbox_inside_a3 A3 MediaBox, only an A4 CropBox is visible
10_cropbox_rotate90 offset CropBox and /Rotate 90 together
11_inherited_rotate /Rotate and MediaBox sit on the Pages node, the page itself has neither
12_unbalanced_cm the page content sets a 0.5 scale and never restores it; an appended stamp not wrapped in q/Q comes out half size
13_mixed_pages 4 pages: A4, Letter landscape, A5 rotated 90, A4; initials on every page, two signatures on the last
14_two_signers two signature boxes and two date boxes on one page
15_long_document 24 pages, the only boxes are on the last page
16_acroform_signature_field empty signature form field and a Date text field
17_scanned_form a 150 dpi grey scan tilted 0.8 degrees, no text layer; the box coordinates are the bounds of the tilted box

boxes.csv

column meaning
document, page file and 1-based page number
role, label signature, date or initials, and the text printed in the box
page_rotate, mediabox, cropbox the page geometry, with inherited values resolved
display_width_pt, display_height_pt size of the page as shown, after CropBox and rotation
box_x_pt, box_y_pt, box_w_pt, box_h_pt box on screen: origin top left, y down, in points (1/72 inch)
box_x_rel ... box_h_rel the same divided by the displayed page size
pdf_x0, pdf_y0, pdf_x1, pdf_y1 the box in PDF user space, ready for an annotation /Rect
form_field name of the form field at this box, if any
case, signed_reference what the document tests, and the reference file

To convert screen points to pixels, multiply by your zoom (at 100 % one point is 96/72 pixels in most viewers).

How the files were checked

  • pdf.js opened all 34 PDFs, and for every box the PDF rectangle converted to screen coordinates matches box_*_pt within 0.01 pt, the page size matches, the box label is found by text extraction and is upright on screen, and the form fields are found by name.
  • pypdf 5.1 opens all 34 PDFs in strict mode without warnings.
  • The signed references were rendered in Chrome and looked at, including the rotated, offset and scaled cases.

What is not here

No cryptographic (certificate based) signatures: this is about where a visible signature goes, not about PAdES. No encrypted files and no XFA forms. The signatures are synthetic scribbles, so they are not suitable for training signature verification or forgery detection models.

Signing these files in a browser

To try a document by hand, open it in https://toolster.net/sign_pdf : draw with the mouse or type a name, then save. The PDF is processed in the browser and is not uploaded.

Downloads last month
51