github.com/pdfcpu/pdfcpu@v0.11.1/pkg/testdata/json/form/demo/english.json (about) 1 { 2 "paper": "A4P", 3 "crop": "10", 4 "origin": "LowerLeft", 5 "contentBox": false, 6 "debug": false, 7 "guides": false, 8 "colors": { 9 "DarkOrange": "#FF8C00", 10 "DarkSeaGreen": "#8FBC8F" 11 }, 12 "dirs": { 13 "images": "../../testdata/resources" 14 }, 15 "files": { 16 "logo1": "$images/logoVerySmall.png", 17 "logo2": "$images/github.png" 18 }, 19 "images": { 20 "logo1": { 21 "src": "$logo1", 22 "url": "https://pdfcpu.io", 23 "margin": { 24 "width": 5 25 } 26 }, 27 "logo2": { 28 "src": "$logo2", 29 "url": "https://github.com/pdfcpu/pdfcpu", 30 "margin": { 31 "width": 5 32 } 33 } 34 }, 35 "fonts": { 36 "myCourier": { 37 "name": "Courier", 38 "size": 12 39 }, 40 "myCourierBold": { 41 "name": "Courier-Bold", 42 "size": 12 43 }, 44 "input": { 45 "name": "Helvetica", 46 "size": 12 47 }, 48 "label": { 49 "name": "$input" 50 } 51 }, 52 "margin": { 53 "width": 10 54 }, 55 "header": { 56 "font": { 57 "name": "$myCourierBold", 58 "size": 24, 59 "col": "#C00000" 60 }, 61 "left": "$logo1", 62 "center": "Demo Form", 63 "right": "$logo2", 64 "height": 40, 65 "dx": 5, 66 "dy": 5, 67 "border": false 68 }, 69 "footer": { 70 "font": { 71 "name": "Courier", 72 "size": 9 73 }, 74 "left": "pdfcpu: %v\nCreated: %t", 75 "center": "Optimized for A.Reader\nPage %p of %P", 76 "right": "Source:\ntestdata/json/form/demo/english.json", 77 "height": 30, 78 "dx": 5, 79 "dy": 5, 80 "border": false 81 }, 82 "pages": { 83 "1": { 84 "content": { 85 "textfield": [ 86 { 87 "hide": false, 88 "id": "firstName1", 89 "tip": "First Name", 90 "tab": 1, 91 "//default": "default name", 92 "pos": [ 93 120, 94 665 95 ], 96 "width": 200, 97 "align": "left", 98 "border": { 99 "width":1, 100 "col": "Gray" 101 }, 102 "label": { 103 "value": "First Name:", 104 "width": 80, 105 "gap": 10, 106 "align": "left", 107 "pos": "left" 108 } 109 }, 110 { 111 "hide": false, 112 "id": "lastName1", 113 "tip": "Last Name", 114 "tab": 2, 115 "pos": [ 116 120, 117 645 118 ], 119 "width": 200, 120 "align": "left", 121 "border": { 122 "width":1, 123 "col": "Gray" 124 }, 125 "label": { 126 "value": "Last Name:", 127 "width": 80, 128 "gap": 10, 129 "align": "left", 130 "pos": "left" 131 } 132 }, 133 { 134 "hide": false, 135 "id": "note1", 136 "tip": "Reason", 137 "tab": 12, 138 "multiline": true, 139 "value": "This is a sample text.\nThis is the next line.", 140 "pos": [ 141 120, 142 132 143 ], 144 "width": 200, 145 "height":70, 146 "align": "left", 147 "border": { 148 "width":1, 149 "col": "Gray" 150 } 151 } 152 ], 153 154 "datefield": [ 155 { 156 "hide": false, 157 "id": "dob1", 158 "tab": 3, 159 "format": "dd.mm.yyyy", 160 "//default": "01.01.2000", 161 "//value": "31.12.1999", 162 "pos": [ 163 120, 164 625 165 ], 166 "width": 70, 167 "border": { 168 "width":1, 169 "col": "Gray" 170 }, 171 "label": { 172 "value": "Date Of Birth:", 173 "width": 80, 174 "gap": 10, 175 "align": "left", 176 "pos": "left" 177 } 178 } 179 ], 180 181 "radiobuttongroup": [ 182 { 183 "hide": false, 184 "id": "gender1", 185 "tip": "Gender", 186 "tab": 4, 187 "orientation": "hor", 188 "//default": "female", 189 "//value": "male", 190 "pos": [ 191 120, 192 605 193 ], 194 "width": 12, 195 "buttons": { 196 "values": [ 197 "female", 198 "male", 199 "non-binary" 200 ], 201 "label": { 202 "value": "dummy", 203 "width": 50, 204 "gap": 10, 205 "pos": "right" 206 } 207 }, 208 "label": { 209 "value": "Gender:", 210 "width": 80, 211 "gap": 10, 212 "align": "left", 213 "pos": "left" 214 } 215 } 216 ], 217 218 "checkbox": [ 219 { 220 "hide": false, 221 "id": "cb11", 222 "tip": "Google Search", 223 "tab": 7, 224 "//default": true, 225 "value": false, 226 "pos": [ 227 30, 228 270 229 ], 230 "width": 12, 231 "label": { 232 "value": "Google Search", 233 "width": 80, 234 "gap": 5, 235 "align": "left", 236 "pos": "right" 237 } 238 }, 239 { 240 "hide": false, 241 "id": "cb12", 242 "tip": "Github Search", 243 "tab": 8, 244 "value": false, 245 "pos": [ 246 30, 247 250 248 ], 249 "width": 12, 250 "label": { 251 "value": "Github Search", 252 "width": 80, 253 "gap": 5, 254 "align": "left", 255 "pos": "right" 256 } 257 }, 258 { 259 "hide": false, 260 "id": "cb13", 261 "tip": "Golang Weekly", 262 "tab": 9, 263 "value": false, 264 "pos": [ 265 30, 266 230 267 ], 268 "width": 12, 269 "label": { 270 "value": "Golang Weekly", 271 "width": 80, 272 "gap": 5, 273 "align": "left", 274 "pos": "right" 275 } 276 }, 277 { 278 "hide": false, 279 "id": "cb14", 280 "tip": "Fellow Gopher", 281 "tab": 10, 282 "value": false, 283 "pos": [ 284 30, 285 210 286 ], 287 "width": 12, 288 "label": { 289 "value": "Fellow Gopher", 290 "width": 80, 291 "gap": 5, 292 "align": "left", 293 "pos": "right" 294 } 295 }, 296 { 297 "hide": false, 298 "id": "cb15", 299 "tip": "Other", 300 "tab": 11, 301 "value": false, 302 "pos": [ 303 30, 304 190 305 ], 306 "width": 12, 307 "label": { 308 "value": "Other:", 309 "width": 80, 310 "gap": 5, 311 "align": "left", 312 "pos": "right" 313 } 314 } 315 ], 316 317 "listbox": [ 318 { 319 "hide": false, 320 "id": "city11", 321 "tip": "Favorite city", 322 "tab": 5, 323 "options": [ 324 "San Francisco", 325 "São Paulo", 326 "Vienna" 327 ], 328 "multi": true, 329 "//defaults": [ 330 "Vienna", 331 "São Paulo" 332 ], 333 "//values": [ 334 "San Francisco", 335 "Vienna" 336 ], 337 "pos": [ 338 120, 339 530 340 ], 341 "width": 200, 342 "height": 42, 343 "border": { 344 "width":1, 345 "col": "Gray" 346 }, 347 "label": { 348 "value": "Favorite city:", 349 "width": 80, 350 "gap": 10, 351 "align": "left", 352 "pos": "left" 353 } 354 } 355 ], 356 357 "combobox": [ 358 { 359 "hide": false, 360 "id": "city12", 361 "tip": "City", 362 "tab": 6, 363 "options": [ 364 "London", 365 "San Francisco", 366 "Sidney" 367 ], 368 "edit": false, 369 "//default": "San Francisco", 370 "//value": "Sidney", 371 "pos": [ 372 120, 373 500 374 ], 375 "width": 200, 376 "border": { 377 "width":1, 378 "col": "Gray" 379 }, 380 "label": { 381 "value": "City:", 382 "width": 80, 383 "gap": 10, 384 "align": "left", 385 "pos": "left" 386 } 387 } 388 ], 389 390 "text": [ 391 { 392 "hide": false, 393 "value": "1) Please tell us about yourself:", 394 "pos": [ 395 10, 396 690 397 ], 398 "font": { 399 "name": "$label" 400 } 401 }, 402 { 403 "hide": false, 404 "value": "2) How did you hear about pdfcpu:", 405 "pos": [ 406 10, 407 290 408 ], 409 "font": { 410 "name": "$label" 411 } 412 } 413 ] 414 } 415 }, 416 "2": { 417 "content": { 418 "textfield": [ 419 { 420 "hide": false, 421 "id": "firstName2", 422 "tip": "First Name", 423 "tab": 1, 424 "value": "Jackie", 425 "pos": [ 426 120, 427 665 428 ], 429 "width": 200, 430 "align": "left", 431 "border": { 432 "width":1, 433 "col": "Gray" 434 }, 435 "label": { 436 "value": "First Name:", 437 "width": 80, 438 "gap": 10, 439 "align": "left", 440 "pos": "left" 441 } 442 }, 443 { 444 "hide": false, 445 "id": "lastName2", 446 "tip": "Last Name", 447 "tab": 2, 448 "value": "Doe", 449 "pos": [ 450 120, 451 645 452 ], 453 "width": 200, 454 "align": "left", 455 "border": { 456 "width":1, 457 "col": "Gray" 458 }, 459 "label": { 460 "value": "Last Name:", 461 "width": 80, 462 "gap": 10, 463 "align": "left", 464 "pos": "left" 465 } 466 }, 467 { 468 "hide": false, 469 "id": "note2", 470 "tip": "Reason", 471 "tab": 12, 472 "multiline": true, 473 "value": "This is a sample text.\nThis is the next line.", 474 "pos": [ 475 120, 476 132 477 ], 478 "width": 200, 479 "height":70, 480 "align": "left", 481 "border": { 482 "width":1, 483 "col": "Gray" 484 } 485 } 486 ], 487 488 "datefield": [ 489 { 490 "hide": false, 491 "id": "dob2", 492 "tab": 3, 493 "value": "31.12.1999", 494 "pos": [ 495 120, 496 625 497 ], 498 "width": 70, 499 "border": { 500 "width":1, 501 "col": "Gray" 502 }, 503 "label": { 504 "value": "Date Of Birth:", 505 "width": 80, 506 "gap": 10, 507 "align": "left", 508 "pos": "left" 509 } 510 } 511 ], 512 513 "radiobuttongroup": [ 514 { 515 "hide": false, 516 "id": "gender2", 517 "tip": "Gender", 518 "tab": 4, 519 "value": "non-binary", 520 "orientation": "hor", 521 "pos": [ 522 120, 523 605 524 ], 525 "width": 12, 526 "buttons": { 527 "values": [ 528 "female", 529 "male", 530 "non-binary" 531 ], 532 "label": { 533 "value": "dummy", 534 "width": 50, 535 "gap": 10, 536 "pos": "right" 537 } 538 }, 539 "label": { 540 "value": "Gender:", 541 "width": 80, 542 "gap": 10, 543 "align": "left", 544 "pos": "left" 545 } 546 } 547 ], 548 549 "checkbox": [ 550 { 551 "hide": false, 552 "id": "cb21", 553 "tip": "Google Search", 554 "tab": 7, 555 "value": true, 556 "pos": [ 557 30, 558 270 559 ], 560 "width": 12, 561 "label": { 562 "value": "Google Search", 563 "width": 80, 564 "gap": 5, 565 "align": "left", 566 "pos": "right" 567 } 568 }, 569 { 570 "hide": false, 571 "id": "cb22", 572 "tip": "Github Search", 573 "tab": 8, 574 "value": false, 575 "pos": [ 576 30, 577 250 578 ], 579 "width": 12, 580 "label": { 581 "value": "Github Search", 582 "width": 80, 583 "gap": 5, 584 "align": "left", 585 "pos": "right" 586 } 587 }, 588 { 589 "hide": false, 590 "id": "cb23", 591 "tip": "Golang Weekly", 592 "tab": 9, 593 "value": false, 594 "pos": [ 595 30, 596 230 597 ], 598 "width": 12, 599 "label": { 600 "value": "Golang Weekly", 601 "width": 80, 602 "gap": 5, 603 "align": "left", 604 "pos": "right" 605 } 606 }, 607 { 608 "hide": false, 609 "id": "cb24", 610 "tip": "Fellow Gopher", 611 "tab": 10, 612 "value": false, 613 "pos": [ 614 30, 615 210 616 ], 617 "width": 12, 618 "label": { 619 "value": "Fellow Gopher", 620 "width": 80, 621 "gap": 5, 622 "align": "left", 623 "pos": "right" 624 } 625 }, 626 { 627 "hide": false, 628 "id": "cb25", 629 "tip": "Other", 630 "tab": 11, 631 "value": false, 632 "pos": [ 633 30, 634 190 635 ], 636 "width": 12, 637 "label": { 638 "value": "Other:", 639 "width": 80, 640 "gap": 5, 641 "align": "left", 642 "pos": "right" 643 } 644 } 645 ], 646 647 "listbox": [ 648 { 649 "hide": false, 650 "id": "city21", 651 "tip": "Favorite city", 652 "tab": 5, 653 "options": [ 654 "San Francisco", 655 "São Paulo", 656 "Vienna" 657 ], 658 "multi": false, 659 "value": "San Francisco", 660 "pos": [ 661 120, 662 530 663 ], 664 "width": 200, 665 "height": 42, 666 "border": { 667 "width":1, 668 "col": "Gray" 669 }, 670 "label": { 671 "value": "Favorite city:", 672 "width": 80, 673 "gap": 10, 674 "align": "left", 675 "pos": "left" 676 } 677 } 678 ], 679 680 "combobox": [ 681 { 682 "hide": false, 683 "id": "city22", 684 "tip": "City", 685 "tab": 6, 686 "options": [ 687 "London", 688 "San Francisco", 689 "Sidney" 690 ], 691 "edit": false, 692 "value": "San Francisco", 693 "pos": [ 694 120, 695 500 696 ], 697 "width": 200, 698 "border": { 699 "width":1, 700 "col": "Gray" 701 }, 702 "label": { 703 "value": "City:", 704 "width": 80, 705 "gap": 10, 706 "align": "left", 707 "pos": "left" 708 } 709 } 710 ], 711 712 "text": [ 713 { 714 "hide": false, 715 "value": "1) Please tell us about yourself:", 716 "pos": [ 717 10, 718 690 719 ], 720 "font": { 721 "name": "$label" 722 } 723 }, 724 { 725 "hide": false, 726 "value": "2) How did you hear about pdfcpu:", 727 "pos": [ 728 10, 729 290 730 ], 731 "font": { 732 "name": "$label" 733 } 734 } 735 ] 736 } 737 } 738 } 739 }