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

     1  {
     2  	"paper": "A4L",
     3  	"crop": "10",
     4  	"origin": "LowerLeft",
     5  	"contentBox": true,
     6  	"debug": false,
     7  	"guides": true,
     8  	"colors": {
     9  		"DarkOrange": "#FF8C00",
    10  		"Beige": "#F5F5DC"
    11  	},
    12  	"files": {
    13  		"logo": "../../testdata/resources/demo.png",
    14  		"logo1": "../../testdata/resources/logoVerySmall.png",
    15  		"logo2": "../../testdata/resources/github.png"
    16  	},
    17  	"fonts": {
    18  		"myCourier": {
    19  			"name": "Courier",
    20  			"size": 12
    21  		}
    22  	},
    23  	"margin": {
    24  		"width": 10
    25  	},
    26  	"borders": {
    27  		"myBorder": {
    28  			"width": 5,
    29  			"col": "#FF0000",
    30  			"style": "round"
    31  		}
    32  	},
    33  	"padding": {
    34  		"width": 10
    35  	},
    36  	"header": {
    37  		"font": {
    38  			"name": "Courier-Bold",
    39  			"size": 24,
    40  			"col": "#FF0000"
    41  		},
    42  		"bgCol": "#FFFFFF",
    43  		"left": "$logo1",
    44  		"center": "Imageboxes using optimized json",
    45  		"right": "$logo2",
    46  		"height": 40,
    47  		"dx": 5,
    48  		"dy": 10,
    49  		"border": false
    50  	},
    51  	"footer": {
    52  		"font": {
    53  			"name": "$myCourier"
    54  		},
    55  		"left": "pdfcpu: %v\nCreated: %t",
    56  		"center": "Page %p of %P",
    57  		"right": "Source:\ntestdata/json/create/imagesOptimized.json",
    58  		"height": 30,
    59  		"dx": 5,
    60  		"dy": 5,
    61  		"border": false
    62  	},
    63  	"images": {
    64  		"basic": {
    65  			"src": "$logo"
    66  		},
    67  		"logo1": {
    68  			"src": "$logo1",
    69  			"url": "https://pdfcpu.io",
    70  			"margin": {
    71  				"width": 5
    72  			}
    73  		},
    74  		"logo2": {
    75  			"src": "$logo2",
    76  			"url": "https://github.com/pdfcpu/pdfcpu",
    77  			"margin": {
    78  				"width": 5
    79  			}
    80  		},
    81  		"withBorder": {
    82  			"src": "$logo",
    83  			"border": {
    84  				"width": 5,
    85  				"col": "$DarkOrange",
    86  				"style": "round"
    87  			}
    88  		},
    89  		"withBorderAndPadding": {
    90  			"src": "$logo",
    91  			"border": {
    92  				"width": 5,
    93  				"col": "$DarkOrange",
    94  				"style": "round"
    95  			},
    96  			"padding": {
    97  				"width": 10
    98  			},
    99  			"bgCol": "$Beige"
   100  		}
   101  	},
   102  	"texts": {
   103  		"label": {
   104  			"dx": 2,
   105  			"dy": 2,
   106  			"font": {
   107  				"name": "$myCourier"
   108  			}
   109  		},
   110  		"centeredLabel": {
   111  			"font": {
   112  				"name": "$myCourier",
   113  				"size": 18
   114  			},
   115  			"align": "center"
   116  		}
   117  	},
   118  	"pages": {
   119  		"1": {
   120  			"bgcol": "#8fbc2f",
   121  			"content": {
   122  				"bgcol": "#8fbcff",
   123  				"border": {
   124  					"width": 10,
   125  					"col": "#698b69",
   126  					"style": "round"
   127  				},
   128  				"guides": [
   129  					{
   130  						"pos": [
   131  							250,
   132  							150
   133  						]
   134  					},
   135  					{
   136  						"pos": [
   137  							250,
   138  							350
   139  						]
   140  					}
   141  				],
   142  				"image": [
   143  					{
   144  						"name": "$withBorder",
   145  						"pos": [
   146  							0,
   147  							0
   148  						],
   149  						"width": 200,
   150  						"height": 100
   151  					},
   152  					{
   153  						"name": "$withBorder",
   154  						"pos": [
   155  							0,
   156  							150
   157  						],
   158  						"width": 100,
   159  						"height": 200
   160  					},
   161  					{
   162  						"name": "$withBorder",
   163  						"pos": [
   164  							250,
   165  							0
   166  						],
   167  						"width": 200
   168  					},
   169  					{
   170  						"name": "$withBorder",
   171  						"pos": [
   172  							250,
   173  							150
   174  						],
   175  						"height": 200
   176  					}
   177  				],
   178  				"text": [
   179  					{
   180  						"name": "$label",
   181  						"value": "w=200, h=100",
   182  						"pos": [
   183  							0,
   184  							100
   185  						]
   186  					},
   187  					{
   188  						"name": "$label",
   189  						"value": "w=100, h=200",
   190  						"pos": [
   191  							0,
   192  							350
   193  						]
   194  					},
   195  					{
   196  						"name": "$label",
   197  						"value": "w=200",
   198  						"pos": [
   199  							450,
   200  							0
   201  						]
   202  					},
   203  					{
   204  						"name": "$label",
   205  						"value": "h=200",
   206  						"pos": [
   207  							250,
   208  							350
   209  						]
   210  					},
   211  					{
   212  						"name": "$centeredLabel",
   213  						"value": "border:5",
   214  						"pos": [
   215  							-1,
   216  							375
   217  						]
   218  					}
   219  				]
   220  			}
   221  		},
   222  		"2": {
   223  			"bgcol": "#8fbc2f",
   224  			"content": {
   225  				"bgcol": "#8fbcff",
   226  				"border": {
   227  					"width": 10,
   228  					"col": "#698b69",
   229  					"style": "round"
   230  				},
   231  				"guides": [
   232  					{
   233  						"pos": [
   234  							250,
   235  							150
   236  						]
   237  					},
   238  					{
   239  						"pos": [
   240  							250,
   241  							350
   242  						]
   243  					}
   244  				],
   245  				"image": [
   246  					{
   247  						"name": "$withBorderAndPadding",
   248  						"pos": [
   249  							0,
   250  							0
   251  						],
   252  						"width": 200,
   253  						"height": 100
   254  					},
   255  					{
   256  						"name": "$withBorderAndPadding",
   257  						"pos": [
   258  							0,
   259  							150
   260  						],
   261  						"width": 100,
   262  						"height": 200
   263  					},
   264  					{
   265  						"name": "$withBorderAndPadding",
   266  						"pos": [
   267  							250,
   268  							0
   269  						],
   270  						"width": 200
   271  					},
   272  					{
   273  						"name": "$withBorderAndPadding",
   274  						"pos": [
   275  							250,
   276  							150
   277  						],
   278  						"height": 200
   279  					}
   280  				],
   281  				"text": [
   282  					{
   283  						"name": "$label",
   284  						"value": "w=200, h=100",
   285  						"pos": [
   286  							0,
   287  							100
   288  						]
   289  					},
   290  					{
   291  						"name": "$label",
   292  						"value": "w=100, h=200",
   293  						"pos": [
   294  							0,
   295  							350
   296  						]
   297  					},
   298  					{
   299  						"name": "$label",
   300  						"value": "w=200",
   301  						"pos": [
   302  							450,
   303  							0
   304  						]
   305  					},
   306  					{
   307  						"name": "$label",
   308  						"value": "h=200",
   309  						"pos": [
   310  							250,
   311  							350
   312  						]
   313  					},
   314  					{
   315  						"name": "$centeredLabel",
   316  						"value": "bgCol, border:5, padding: 10",
   317  						"pos": [
   318  							-1,
   319  							375
   320  						]
   321  					}
   322  				]
   323  			}
   324  		},
   325  		"3": {
   326  			"content": {
   327  				"guides": [
   328  					{
   329  						"pos": [
   330  							-1,
   331  							-1
   332  						]
   333  					},
   334  					{
   335  						"pos": [
   336  							-1,
   337  							100
   338  						]
   339  					},
   340  					{
   341  						"pos": [
   342  							174,
   343  							-1
   344  						]
   345  					}
   346  				],
   347  				"image": [
   348  					{
   349  						"name": "$withBorder",
   350  						"anchor": "topleft",
   351  						"height": 100
   352  					},
   353  					{
   354  						"name": "$withBorderAndPadding",
   355  						"anchor": "topcenter",
   356  						"height": 100
   357  					},
   358  					{
   359  						"name": "$basic",
   360  						"anchor": "topright",
   361  						"height": 100
   362  					},
   363  					{
   364  						"name": "$withBorderAndPadding",
   365  						"anchor": "left",
   366  						"height": 100
   367  					},
   368  					{
   369  						"name": "$basic",
   370  						"anchor": "center",
   371  						"height": 100
   372  					},
   373  					{
   374  						"name": "$withBorder",
   375  						"anchor": "right",
   376  						"height": 100
   377  					},
   378  					{
   379  						"name": "$basic",
   380  						"anchor": "bottomleft",
   381  						"height": 100
   382  					},
   383  					{
   384  						"name": "$withBorder",
   385  						"anchor": "bottomcenter",
   386  						"height": 100
   387  					},
   388  					{
   389  						"name": "$withBorderAndPadding",
   390  						"anchor": "bottomright",
   391  						"height": 100
   392  					}
   393  				],
   394  				"text": [
   395  					{
   396  						"name": "$centeredLabel",
   397  						"value": "anchored, height: 100",
   398  						"pos": [
   399  							-1,
   400  							290
   401  						]
   402  					}
   403  				]
   404  			}
   405  		},
   406  		"4": {
   407  			"content": {
   408  				"guides": [
   409  					{
   410  						"pos": [
   411  							-1,
   412  							-1
   413  						]
   414  					},
   415  					{
   416  						"pos": [
   417  							-1,
   418  							86
   419  						]
   420  					},
   421  					{
   422  						"pos": [
   423  							150,
   424  							-1
   425  						]
   426  					}
   427  				],
   428  				"image": [
   429  					{
   430  						"name": "$withBorder",
   431  						"anchor": "topleft",
   432  						"width": 150
   433  					},
   434  					{
   435  						"name": "$withBorderAndPadding",
   436  						"anchor": "topcenter",
   437  						"width": 150
   438  					},
   439  					{
   440  						"name": "$basic",
   441  						"anchor": "topright",
   442  						"width": 150
   443  					},
   444  					{
   445  						"name": "$withBorderAndPadding",
   446  						"anchor": "left",
   447  						"width": 150
   448  					},
   449  					{
   450  						"name": "$basic",
   451  						"anchor": "center",
   452  						"width": 150
   453  					},
   454  					{
   455  						"name": "$withBorder",
   456  						"anchor": "right",
   457  						"width": 150
   458  					},
   459  					{
   460  						"name": "$basic",
   461  						"anchor": "bottomleft",
   462  						"width": 150
   463  					},
   464  					{
   465  						"name": "$withBorder",
   466  						"anchor": "bottomcenter",
   467  						"width": 150
   468  					},
   469  					{
   470  						"name": "$withBorderAndPadding",
   471  						"anchor": "bottomright",
   472  						"width": 150
   473  					}
   474  				],
   475  				"text": [
   476  					{
   477  						"name": "$centeredLabel",
   478  						"value": "anchored, width: 150",
   479  						"pos": [
   480  							-1,
   481  							290
   482  						]
   483  					}
   484  				]
   485  			}
   486  		},
   487  		"5": {
   488  			"content": {
   489  				"guides": [
   490  					{
   491  						"pos": [
   492  							-1,
   493  							-1
   494  						]
   495  					},
   496  					{
   497  						"pos": [
   498  							100,
   499  							100
   500  						]
   501  					}
   502  				],
   503  				"image": [
   504  					{
   505  						"name": "$withBorder",
   506  						"anchor": "topleft",
   507  						"width": 100,
   508  						"height":100
   509  					},
   510  					{
   511  						"name": "$withBorderAndPadding",
   512  						"anchor": "topcenter",
   513  						"width": 100,
   514  						"height":100
   515  					},
   516  					{
   517  						"name": "$basic",
   518  						"anchor": "topright",
   519  						"width": 100,
   520  						"height":100
   521  					},
   522  					{
   523  						"name": "$withBorderAndPadding",
   524  						"anchor": "left",
   525  						"width": 100,
   526  						"height":100
   527  					},
   528  					{
   529  						"name": "$basic",
   530  						"anchor": "center",
   531  						"width": 100,
   532  						"height":100
   533  					},
   534  					{
   535  						"name": "$withBorder",
   536  						"anchor": "right",
   537  						"width": 100,
   538  						"height":100
   539  					},
   540  					{
   541  						"name": "$basic",
   542  						"anchor": "bottomleft",
   543  						"width": 100,
   544  						"height":100
   545  					},
   546  					{
   547  						"name": "$withBorder",
   548  						"anchor": "bottomcenter",
   549  						"width": 100,
   550  						"height":100
   551  					},
   552  					{
   553  						"name": "$withBorderAndPadding",
   554  						"anchor": "bottomright",
   555  						"width": 100,
   556  						"height":100
   557  					}
   558  				],
   559  				"text": [
   560  					{
   561  						"name": "$centeredLabel",
   562  						"value": "anchored, width: 100, height: 100",
   563  						"pos": [
   564  							-1,
   565  							290
   566  						]
   567  					}
   568  				]
   569  			}
   570  		}
   571  	}
   572  }