github.com/pdfcpu/pdfcpu@v0.11.1/pkg/testdata/json/create/boxesAndColors.json (about)

     1  {
     2  	"paper": "A4L",
     3  	"crop": "10",
     4  	"origin": "UpperLeft",
     5  	"contentBox": false,
     6  	"debug": false,
     7  	"guides": false,
     8  	"colors": {
     9  		"ForestGreen": "#228B22",
    10  		"DodgerBlue1": "#1E90FF",
    11  		"DeepPink1": "#FF1493",
    12  		"DarkSeaGreen": "#8FBC8F",
    13  		"DarkSalmon": "#E9967A",
    14  		"DarkOrange": "#FF8C00",
    15  		"Chocolate": "#D2691E",
    16  		"Beige": "#F5F5DC",
    17  		"MediumPurple1": "#AB82FF",
    18  		"Pink": "#FFC0CB"
    19  	},
    20  	"dirs": {
    21  		"images": "../../testdata/resources"
    22  	},
    23  	"files": {
    24  		"logo1": "$images/logoVerySmall.png",
    25  		"logo2": "$images/github.png"
    26  	},
    27  	"fonts": {
    28  		"myCourier": {
    29  			"name": "Courier",
    30  			"size": 12
    31  		}
    32  	},
    33  	"margin": {
    34  		"width": 10
    35  	},
    36  	"borders": {
    37  		"border": {
    38  			"width": 10,
    39  			"col": "$DodgerBlue1"
    40  		},
    41  		"myBorder": {
    42  			"width": 5,
    43  			"col": "#FF0000",
    44  			"style": "round"
    45  		}
    46  	},
    47  	"padding": {
    48  		"width": 10
    49  	},
    50  	"header": {
    51  		"font": {
    52  			"name": "Courier-Bold",
    53  			"size": 24,
    54  			"col": "#FF0000"
    55  		},
    56  		"bgCol": "#FFFFFF",
    57  		"left": "$logo1",
    58  		"center": "Boxes & colors",
    59  		"right": "$logo2",
    60  		"height": 40,
    61  		"dx": 5,
    62  		"dy": 10,
    63  		"border": false
    64  	},
    65  	"footer": {
    66  		"font": {
    67  			"name": "$myCourier"
    68  		},
    69  		"left": "pdfcpu: %v\nCreated: %t",
    70  		"center": "Page %p of %P",
    71  		"right": "Source:\ntestdata/json/create/boxesAndColors.json",
    72  		"height": 30,
    73  		"dx": 5,
    74  		"dy": 5,
    75  		"border": false
    76  	},
    77  	"boxes": {
    78  		"colorBox": {
    79  			"width": 100,
    80  			"height": 50,
    81  			"fillCol": "Black",
    82  			"border": {
    83  				"name": "$boxBorder"
    84  			}
    85  		}
    86  	},
    87  	"images": {
    88  		"logo1": {
    89  			"src": "$logo1",
    90  			"url": "https://pdfcpu.io",
    91  			"margin": {
    92  				"width": 5
    93  			}
    94  		},
    95  		"logo2": {
    96  			"src": "$logo2",
    97  			"url": "https://github.com/pdfcpu/pdfcpu",
    98  			"margin": {
    99  				"width": 5
   100  			}
   101  		}
   102  	},
   103  	"texts": {
   104  		"colorBoxLabel": {
   105  			"align": "center",
   106  			"font": {
   107  				"name": "$labelFont"
   108  			}
   109  		}
   110  	},
   111  	"pages": {
   112  		"1": {
   113  			"bgcol": "#8fbc2f",
   114  			"content": {
   115  				"bgcol": "#8fbcff",
   116  				"border": {
   117  					"width": 10,
   118  					"col": "#698b69",
   119  					"style": "round"
   120  				},
   121  				"guides": [
   122  					{
   123  						"pos": [
   124  							-1,
   125  							-1
   126  						]
   127  					},
   128  					{
   129  						"pos": [
   130  							200,
   131  							100
   132  						]
   133  					}
   134  				],
   135  				"box": [
   136  					{
   137  						"hide": false,
   138  						"comment": "Empty box",
   139  						"anchor": "topLeft",
   140  						"width": 200,
   141  						"height": 100,
   142  						"border": {
   143  							"col": "black"
   144  						}
   145  					},
   146  					{
   147  						"hide": false,
   148  						"comment": "Filled box with border",
   149  						"anchor": "topCenter",
   150  						"width": 200,
   151  						"height": 100,
   152  						"fillCol": "$Beige",
   153  						"border": {
   154  							"width": 10,
   155  							"col": "#032890"
   156  						}
   157  					},
   158  					{
   159  						"hide": false,
   160  						"comment": "Filled box without border",
   161  						"anchor": "topRight",
   162  						"width": 200,
   163  						"height": 100,
   164  						"fillCol": "$Beige"
   165  					},
   166  					{
   167  						"hide": false,
   168  						"comment": "Filled box without border",
   169  						"anchor": "left",
   170  						"width": 200,
   171  						"height": 100,
   172  						"fillCol": "$beige",
   173  						"border": {
   174  							"col": "black"
   175  						}
   176  					},
   177  					{
   178  						"hide": false,
   179  						"comment": "Filled box with rounded border",
   180  						"anchor": "center",
   181  						"width": 200,
   182  						"height": 100,
   183  						"fillCol": "#AA2890",
   184  						"border": {
   185  							"width": 10,
   186  							"col": "#0022AA",
   187  							"style": "round"
   188  						}
   189  					},
   190  					{
   191  						"hide": false,
   192  						"comment": "Empty box with border",
   193  						"anchor": "right",
   194  						"width": 200,
   195  						"height": 100,
   196  						"border": {
   197  							"name": "$myBorder"
   198  						}
   199  					},
   200  					{
   201  						"hide": false,
   202  						"comment": "Empty box with border",
   203  						"anchor": "bottomLeft",
   204  						"width": 200,
   205  						"height": 100,
   206  						"border": {
   207  							"width": 10,
   208  							"col": "#00AA00",
   209  							"style": "round"
   210  						}
   211  					},
   212  					{
   213  						"hide": false,
   214  						"comment": "Empty box, red border",
   215  						"anchor": "bottomCenter",
   216  						"width": 200,
   217  						"height": 100,
   218  						"border": {
   219  							"width": 0,
   220  							"col": "#FF0000"
   221  						}
   222  					},
   223  					{
   224  						"hide": false,
   225  						"comment": "Filled box with border",
   226  						"anchor": "bottomRight",
   227  						"width": 200,
   228  						"height": 100,
   229  						"fillCol": "#032890",
   230  						"border": {
   231  							"width": 10,
   232  							"col": "#00AA00"
   233  						}
   234  					}
   235  				]
   236  			}
   237  		},
   238  		"2": {
   239  			"content": {
   240  				"borders": {
   241  					"boxBorder": {
   242  						"col": "Black"
   243  					}
   244  				},
   245  				"fonts": {
   246  					"labelFont": {
   247  						"name": "Courier",
   248  						"size": 9
   249  					}
   250  				},
   251  				"bar": [
   252  					{
   253  						"hide": false,
   254  						"y": 75,
   255  						"width": 0,
   256  						"col": "black",
   257  						"style": "round"
   258  					}
   259  				],
   260  				"guides": [
   261  					{
   262  						"pos": [
   263  							100,
   264  							100
   265  						]
   266  					}
   267  				],
   268  				"box": [
   269  					{
   270  						"pos": [
   271  							0,
   272  							50
   273  						],
   274  						"width": 100,
   275  						"height": 50,
   276  						"fillCol": "Black",
   277  						"border": {
   278  							"name": "$boxBorder"
   279  						}
   280  					},
   281  					{
   282  						"pos": [
   283  							110,
   284  							50
   285  						],
   286  						"width": 100,
   287  						"height": 50,
   288  						"fillCol": "DarkGray",
   289  						"border": {
   290  							"name": "$boxBorder"
   291  						}
   292  					},
   293  					{
   294  						"pos": [
   295  							220,
   296  							50
   297  						],
   298  						"width": 100,
   299  						"height": 50,
   300  						"fillCol": "Gray",
   301  						"border": {
   302  							"name": "$boxBorder"
   303  						}
   304  					},
   305  					{
   306  						"pos": [
   307  							330,
   308  							50
   309  						],
   310  						"width": 100,
   311  						"height": 50,
   312  						"fillCol": "LightGray",
   313  						"border": {
   314  							"name": "$boxBorder"
   315  						}
   316  					},
   317  					{
   318  						"pos": [
   319  							440,
   320  							50
   321  						],
   322  						"width": 100,
   323  						"height": 50,
   324  						"fillCol": "White",
   325  						"border": {
   326  							"name": "$boxBorder"
   327  						}
   328  					},
   329  					{
   330  						"pos": [
   331  							0,
   332  							140
   333  						],
   334  						"width": 100,
   335  						"height": 50,
   336  						"fillCol": "$forestGreen",
   337  						"border": {
   338  							"name": "$boxBorder"
   339  						}
   340  					},
   341  					{
   342  						"pos": [
   343  							110,
   344  							140
   345  						],
   346  						"width": 100,
   347  						"height": 50,
   348  						"fillCol": "$dodgerBlue1",
   349  						"border": {
   350  							"name": "$boxBorder"
   351  						}
   352  					},
   353  					{
   354  						"pos": [
   355  							220,
   356  							140
   357  						],
   358  						"width": 100,
   359  						"height": 50,
   360  						"fillCol": "$deepPink1",
   361  						"border": {
   362  							"name": "$boxBorder"
   363  						}
   364  					},
   365  					{
   366  						"pos": [
   367  							330,
   368  							140
   369  						],
   370  						"width": 100,
   371  						"height": 50,
   372  						"fillCol": "$darkSeaGreen",
   373  						"border": {
   374  							"name": "$boxBorder"
   375  						}
   376  					},
   377  					{
   378  						"pos": [
   379  							0,
   380  							210
   381  						],
   382  						"width": 100,
   383  						"height": 50,
   384  						"fillCol": "$darkSalmon",
   385  						"border": {
   386  							"name": "$boxBorder"
   387  						}
   388  					},
   389  					{
   390  						"pos": [
   391  							110,
   392  							210
   393  						],
   394  						"width": 100,
   395  						"height": 50,
   396  						"fillCol": "$darkOrange",
   397  						"border": {
   398  							"name": "$boxBorder"
   399  						}
   400  					},
   401  					{
   402  						"pos": [
   403  							220,
   404  							210
   405  						],
   406  						"width": 100,
   407  						"height": 50,
   408  						"fillCol": "$chocolate",
   409  						"border": {
   410  							"name": "$boxBorder"
   411  						}
   412  					},
   413  					{
   414  						"pos": [
   415  							0,
   416  							280
   417  						],
   418  						"width": 100,
   419  						"height": 50,
   420  						"fillCol": "$beige",
   421  						"border": {
   422  							"name": "$boxBorder"
   423  						}
   424  					},
   425  					{
   426  						"pos": [
   427  							110,
   428  							280
   429  						],
   430  						"width": 100,
   431  						"height": 50,
   432  						"fillCol": "$mediumPurple1",
   433  						"border": {
   434  							"name": "$boxBorder"
   435  						}
   436  					},
   437  					{
   438  						"pos": [
   439  							0,
   440  							350
   441  						],
   442  						"width": 100,
   443  						"height": 50,
   444  						"fillCol": "$pink",
   445  						"border": {
   446  							"name": "$boxBorder"
   447  						}
   448  					}
   449  				],
   450  				"text": [
   451  					{
   452  						"value": "Black",
   453  						"pos": [
   454  							50,
   455  							63
   456  						],
   457  						"align": "center",
   458  						"font": {
   459  							"name": "$labelFont"
   460  						}
   461  					},
   462  					{
   463  						"value": "DarkGray",
   464  						"pos": [
   465  							160,
   466  							63
   467  						],
   468  						"align": "center",
   469  						"font": {
   470  							"name": "$labelFont"
   471  						}
   472  					},
   473  					{
   474  						"value": "Gray",
   475  						"pos": [
   476  							270,
   477  							63
   478  						],
   479  						"align": "center",
   480  						"font": {
   481  							"name": "$labelFont"
   482  						}
   483  					},
   484  					{
   485  						"value": "LightGray",
   486  						"pos": [
   487  							380,
   488  							63
   489  						],
   490  						"align": "center",
   491  						"font": {
   492  							"name": "$labelFont"
   493  						}
   494  					},
   495  					{
   496  						"value": "White",
   497  						"pos": [
   498  							490,
   499  							63
   500  						],
   501  						"align": "center",
   502  						"font": {
   503  							"name": "$labelFont"
   504  						}
   505  					},
   506  					{
   507  						"value": "<= Predefined",
   508  						"align": "left",
   509  						"pos": [
   510  							600,
   511  							30
   512  						],
   513  						"font": {
   514  							"name": "$labelFont"
   515  						}
   516  					},
   517  					{
   518  						"value": "ForestGreen",
   519  						"pos": [
   520  							50,
   521  							153
   522  						],
   523  						"align": "center",
   524  						"font": {
   525  							"name": "$labelFont"
   526  						}
   527  					},
   528  					{
   529  						"value": "DodgerBlue1",
   530  						"pos": [
   531  							160,
   532  							153
   533  						],
   534  						"align": "center",
   535  						"font": {
   536  							"name": "$labelFont"
   537  						}
   538  					},
   539  					{
   540  						"value": "DeepPink1",
   541  						"pos": [
   542  							270,
   543  							153
   544  						],
   545  						"align": "center",
   546  						"font": {
   547  							"name": "$labelFont"
   548  						}
   549  					},
   550  					{
   551  						"value": "DarkSeaGreen",
   552  						"pos": [
   553  							380,
   554  							153
   555  						],
   556  						"align": "center",
   557  						"font": {
   558  							"name": "$labelFont"
   559  						}
   560  					},
   561  					{
   562  						"value": "<= Custom",
   563  						"align": "left",
   564  						"pos": [
   565  							600,
   566  							120
   567  						],
   568  						"font": {
   569  							"name": "$labelFont"
   570  						}
   571  					},
   572  					{
   573  						"value": "DarkSalmon",
   574  						"pos": [
   575  							50,
   576  							223
   577  						],
   578  						"align": "center",
   579  						"font": {
   580  							"name": "$labelFont"
   581  						}
   582  					},
   583  					{
   584  						"value": "DarkOrange",
   585  						"pos": [
   586  							160,
   587  							223
   588  						],
   589  						"align": "center",
   590  						"font": {
   591  							"name": "$labelFont"
   592  						}
   593  					},
   594  					{
   595  						"value": "Chocolate",
   596  						"pos": [
   597  							270,
   598  							223
   599  						],
   600  						"align": "center",
   601  						"font": {
   602  							"name": "$labelFont"
   603  						}
   604  					},
   605  					{
   606  						"value": "Beige",
   607  						"pos": [
   608  							50,
   609  							293
   610  						],
   611  						"align": "center",
   612  						"font": {
   613  							"name": "$labelFont"
   614  						}
   615  					},
   616  					{
   617  						"value": "MediumPurple1",
   618  						"pos": [
   619  							160,
   620  							293
   621  						],
   622  						"align": "center",
   623  						"font": {
   624  							"name": "$labelFont"
   625  						}
   626  					},
   627  					{
   628  						"value": "Pink",
   629  						"pos": [
   630  							50,
   631  							363
   632  						],
   633  						"align": "center",
   634  						"font": {
   635  							"name": "$labelFont"
   636  						}
   637  					}
   638  				]
   639  			}
   640  		},
   641  		"3": {
   642  			"content": {
   643  				"borders": {
   644  					"boxBorder": {
   645  						"col": "Black"
   646  					}
   647  				},
   648  				"fonts": {
   649  					"labelFont": {
   650  						"name": "Helvetica",
   651  						"size": 9
   652  					}
   653  				},
   654  				"bar": [
   655  					{
   656  						"hide": false,
   657  						"y": 75,
   658  						"width": 0,
   659  						"col": "black",
   660  						"style": "round"
   661  					}
   662  				],
   663  				"box": [
   664  					{
   665  						"name": "$colorBox",
   666  						"fillCol": "Black",
   667  						"pos": [
   668  							0,
   669  							50
   670  						]
   671  					},
   672  					{
   673  						"name": "$colorBox",
   674  						"fillCol": "DarkGray",
   675  						"pos": [
   676  							110,
   677  							50
   678  						]
   679  					},
   680  					{
   681  						"name": "$colorBox",
   682  						"fillCol": "Gray",
   683  						"pos": [
   684  							220,
   685  							50
   686  						]
   687  					},
   688  					{
   689  						"name": "$colorBox",
   690  						"fillCol": "LightGray",
   691  						"pos": [
   692  							330,
   693  							50
   694  						]
   695  					},
   696  					{
   697  						"name": "$colorBox",
   698  						"fillCol": "White",
   699  						"pos": [
   700  							440,
   701  							50
   702  						]
   703  					},
   704  					{
   705  						"name": "$colorBox",
   706  						"fillCol": "$forestGreen",
   707  						"pos": [
   708  							0,
   709  							140
   710  						]
   711  					},
   712  					{
   713  						"name": "$colorBox",
   714  						"fillCol": "$dodgerBlue1",
   715  						"pos": [
   716  							110,
   717  							140
   718  						]
   719  					},
   720  					{
   721  						"name": "$colorBox",
   722  						"fillCol": "$deepPink1",
   723  						"pos": [
   724  							220,
   725  							140
   726  						]
   727  					},
   728  					{
   729  						"name": "$colorBox",
   730  						"fillCol": "$darkSeaGreen",
   731  						"pos": [
   732  							330,
   733  							140
   734  						]
   735  					},
   736  					{
   737  						"name": "$colorBox",
   738  						"fillCol": "$darkSalmon",
   739  						"pos": [
   740  							0,
   741  							210
   742  						]
   743  					},
   744  					{
   745  						"name": "$colorBox",
   746  						"fillCol": "$darkOrange",
   747  						"pos": [
   748  							110,
   749  							210
   750  						]
   751  					},
   752  					{
   753  						"name": "$colorBox",
   754  						"fillCol": "$chocolate",
   755  						"pos": [
   756  							220,
   757  							210
   758  						]
   759  					},
   760  					{
   761  						"name": "$colorBox",
   762  						"fillCol": "$beige",
   763  						"pos": [
   764  							0,
   765  							280
   766  						]
   767  					},
   768  					{
   769  						"name": "$colorBox",
   770  						"fillCol": "$mediumPurple1",
   771  						"pos": [
   772  							110,
   773  							280
   774  						]
   775  					},
   776  					{
   777  						"name": "$colorBox",
   778  						"fillCol": "$pink",
   779  						"pos": [
   780  							0,
   781  							350
   782  						]
   783  					}
   784  				],
   785  				"text": [
   786  					{
   787  						"name": "$colorBoxLabel",
   788  						"value": "Black",
   789  						"pos": [
   790  							50,
   791  							63
   792  						]
   793  					},
   794  					{
   795  						"name": "$colorBoxLabel",
   796  						"value": "DarkGray",
   797  						"pos": [
   798  							160,
   799  							63
   800  						]
   801  					},
   802  					{
   803  						"name": "$colorBoxLabel",
   804  						"value": "Gray",
   805  						"pos": [
   806  							270,
   807  							63
   808  						]
   809  					},
   810  					{
   811  						"name": "$colorBoxLabel",
   812  						"value": "LightGray",
   813  						"pos": [
   814  							380,
   815  							63
   816  						]
   817  					},
   818  					{
   819  						"name": "$colorBoxLabel",
   820  						"value": "White",
   821  						"pos": [
   822  							490,
   823  							63
   824  						]
   825  					},
   826  					{
   827  						"value": "<= Predefined",
   828  						"align": "left",
   829  						"pos": [
   830  							600,
   831  							30
   832  						],
   833  						"font": {
   834  							"name": "$labelFont"
   835  						}
   836  					},
   837  					{
   838  						"name": "$colorBoxLabel",
   839  						"value": "ForestGreen",
   840  						"pos": [
   841  							50,
   842  							153
   843  						]
   844  					},
   845  					{
   846  						"name": "$colorBoxLabel",
   847  						"value": "DodgerBlue1",
   848  						"pos": [
   849  							160,
   850  							153
   851  						]
   852  					},
   853  					{
   854  						"name": "$colorBoxLabel",
   855  						"value": "DeepPink1",
   856  						"pos": [
   857  							270,
   858  							153
   859  						]
   860  					},
   861  					{
   862  						"name": "$colorBoxLabel",
   863  						"value": "DarkSeaGreen",
   864  						"pos": [
   865  							380,
   866  							153
   867  						]
   868  					},
   869  					{
   870  						"value": "<= Custom",
   871  						"align": "left",
   872  						"pos": [
   873  							600,
   874  							120
   875  						],
   876  						"font": {
   877  							"name": "$labelFont"
   878  						}
   879  					},
   880  					{
   881  						"name": "$colorBoxLabel",
   882  						"value": "DarkSalmon",
   883  						"pos": [
   884  							50,
   885  							223
   886  						]
   887  					},
   888  					{
   889  						"name": "$colorBoxLabel",
   890  						"value": "DarkOrange",
   891  						"pos": [
   892  							160,
   893  							223
   894  						]
   895  					},
   896  					{
   897  						"name": "$colorBoxLabel",
   898  						"value": "Chocolate",
   899  						"pos": [
   900  							270,
   901  							223
   902  						]
   903  					},
   904  					{
   905  						"name": "$colorBoxLabel",
   906  						"value": "Beige",
   907  						"pos": [
   908  							50,
   909  							293
   910  						]
   911  					},
   912  					{
   913  						"name": "$colorBoxLabel",
   914  						"value": "MediumPurple1",
   915  						"pos": [
   916  							160,
   917  							293
   918  						]
   919  					},
   920  					{
   921  						"name": "$colorBoxLabel",
   922  						"value": "Pink",
   923  						"pos": [
   924  							50,
   925  							363
   926  						]
   927  					},
   928  					{
   929  						"value": "Optimized using templates for box and text",
   930  						"anchor": "bottomCenter",
   931  						"align": "center",
   932  						"dy": 50,
   933  						"font": {
   934  							"name": "$labelFont",
   935  							"col": "Gray",
   936  							"size": 24
   937  						}
   938  					}
   939  				]
   940  			}
   941  		}
   942  	}
   943  }