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

     1  {
     2  	"paper": "A4L",
     3  	"crop": "10",
     4  	"origin": "LowerLeft",
     5  	"contentBox": true,
     6  	"debug": false,
     7  	"guides": true,
     8  	"colors": {
     9  		"Beige": "#F5F5DC",
    10  		"DarkSalmon": "#E9967A"
    11  	},
    12  	"bgcol": "#BEDED9",
    13  	"timestamp": "2006-01-02 15:04:05",
    14  	"dirs": {
    15  		"images": "../../testdata/resources"
    16  	},
    17  	"files": {
    18  		"logo1": "$images/logoVerySmall.png",
    19  		"logo2": "$images/github.png"
    20  	},
    21  	"fonts": {
    22  		"simpleChinese": {
    23  			"name": "UnifontMedium",
    24  			"size": 12
    25  		}
    26  	},
    27  	"borders": {
    28  		"myBorder": {
    29  			"width": 5
    30  		}
    31  	},
    32  	"margin": {
    33  		"width": 20
    34  	},
    35  	"header": {
    36  		"font": {
    37  			"name": "$simpleChinese",
    38  			"size": 24,
    39  			"col": "#00AA00"
    40  		},
    41  		"left": "$logo1",
    42  		"center": "演示台",
    43  		"right": "$logo2",
    44  		"height": 40,
    45  		"dx": 5,
    46  		"dy": 10,
    47  		"border": false
    48  	},
    49  	"footer": {
    50  		"font": {
    51  			"name": "$simpleChinese",
    52  			"col": "Black"
    53  		},
    54  		"left": "pdfcpu: %v\n创建: %t",
    55  		"center": "第 %p 页,共 %P 页",
    56  		"right": "来源:\ntestdata/json/create/userfonts.json",
    57  		"height": 30,
    58  		"dx": 5,
    59  		"dy": 5,
    60  		"border": false
    61  	},
    62  	"images": {
    63  		"logo1": {
    64  			"src": "$logo1",
    65  			"url": "https://pdfcpu.io",
    66  			"margin": {
    67  				"width": 5
    68  			}
    69  		},
    70  		"logo2": {
    71  			"src": "$logo2",
    72  			"url": "https://github.com/pdfcpu/pdfcpu",
    73  			"margin": {
    74  				"width": 5
    75  			}
    76  		}
    77  	},
    78  	"pages": {
    79  		"1": {
    80  			"content": {
    81  				"guides": [
    82  					{
    83  						"pos": [
    84  							-1,
    85  							-1
    86  						]
    87  					}
    88  				],
    89  				"text": [
    90  					{
    91  						"value": "此文本框是使用 UnifontMedium.ttf 生成的\n这是第二行。",
    92  						"anchor": "topleft",
    93  						"bgCol": "#032890",
    94  						"font": {
    95  							"name": "$simpleChinese",
    96  							"size": 12,
    97  							"col": "$DarkSalmon"
    98  						},
    99  						"margin": {
   100  							"width": 10
   101  						},
   102  						"border": {
   103  							"name": "$myBorder",
   104  							"col": "White"
   105  						},
   106  						"padding": {
   107  							"width": 20
   108  						}
   109  					},
   110  					{
   111  						"hide": false,
   112  						"value": "This text box was generated using UnifontMedium.ttf\nThis is the second line.",
   113  						"anchor": "bottomleft",
   114  						"bgCol": "#032890",
   115  						"font": {
   116  							"name": "$simpleChinese",
   117  							"size": 12,
   118  							"col": "$DarkSalmon"
   119  						},
   120  						"margin": {
   121  							"width": 10
   122  						},
   123  						"border": {
   124  							"name": "$myBorder",
   125  							"col": "White"
   126  						},
   127  						"padding": {
   128  							"width": 20
   129  						}
   130  					}
   131  				],
   132  				"image": [
   133  					{
   134  						"src": "../../testdata/resources/pdfchip3.png",
   135  						"anchor": "bottomright",
   136  						"height": 50,
   137  						"url": "https://pdfcpu.io"
   138  					}
   139  				],
   140  				"table": [
   141  					{
   142  						"header": {
   143  							"values": [
   144  								"数量",
   145  								"描述",
   146  								"价钱",
   147  								"价值"
   148  							],
   149  							"colAnchors": [
   150  								"Center",
   151  								"Center",
   152  								"Center",
   153  								"Center"
   154  							],
   155  							"bgCol": "$DarkSalmon",
   156  							"font": {
   157  								"name": "$simpleChinese",
   158  								"size": 15
   159  							}
   160  						},
   161  						"values": [
   162  							[
   163  								"1",
   164  								"鼠",
   165  								"¥735,87",
   166  								"¥735,87"
   167  							],
   168  							[
   169  								"3",
   170  								"独角兽",
   171  								"¥1599725,00",
   172  								"¥4799175,00"
   173  							],
   174  							[
   175  								"1",
   176  								"地鼠",
   177  								"(无价)"
   178  							]
   179  						],
   180  						"rows": 5,
   181  						"cols": 4,
   182  						"width": 400,
   183  						"colWidths": [
   184  							10,
   185  							40,
   186  							25,
   187  							25
   188  						],
   189  						"colAnchors": [
   190  							"Center",
   191  							"Left",
   192  							"Right",
   193  							"Right"
   194  						],
   195  						"lheight": 30,
   196  						"grid": true,
   197  						"anchor": "center",
   198  						"dx": 0,
   199  						"dy": 0,
   200  						"bgCol": "$Beige",
   201  						"oddCol": "LightGray",
   202  						"evenCol": "Gray",
   203  						"font": {
   204  							"name": "$simpleChinese",
   205  							"size": 12,
   206  							"col": "Black"
   207  						},
   208  						"margin": {
   209  							"width": 0
   210  						},
   211  						"border": {
   212  							"width": 0
   213  						},
   214  						"padding": {
   215  							"width": 5
   216  						},
   217  						"rot": 20
   218  					}
   219  				]
   220  			}
   221  		}
   222  	}
   223  }