Repository navigation
Expand file tree
/
Copy pathexampleData.json
More file actions
211 lines (206 loc) · 10.1 KB
/
Copy pathexampleData.json
File metadata and controls
211 lines (206 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
[
{
"type": "cover_page",
"title": [
{ "text": "The State of" },
{ "text": "Developer Happiness", "accent": true },
{ "text": "2026" }
],
"subtitle": "How json2pdf is changing the lives of developers around the world",
"badge": "Totally Real Research*",
"footer": "*Not real research. Every person, company and number in this report is made up."
},
{
"type": "title",
"content": "Executive Summary"
},
{
"type": "paragraph",
"content": "In 2026, the Global Institute of Questionable Statistics surveyed 12,000 developers across 47 time zones, 3 continents and one very remote cabin with surprisingly good Wi-Fi. The findings are clear: developers who generate PDFs from JSON sleep better, argue less about CSS, and are 3.2x more likely to describe their reports as \"actually kind of nice\"."
},
{
"type": "paragraph",
"content": "Before json2pdf, the average developer spent <strong>11.4 hours per month</strong> nudging tables by one pixel, explaining to stakeholders why page 2 was blank, and whispering apologies to their printer. After adopting it, that number dropped to 14 minutes, most of which were spent picking a font."
},
{
"type": "metric",
"title": "Developer Happiness Index",
"value": 92,
"max": 100,
"badge": "Happiness",
"subStats": [
{ "value": "11.4h → 14min", "label": "Monthly time fixing PDFs" },
{ "value": "0", "label": "Blank pages reported", "color": "default" },
{ "value": "3", "label": "Printers still scared", "color": "danger" }
]
},
{
"type": "metric",
"title": "Reports Generated This Year",
"value": "1.2M",
"severity": "success",
"interpretation": "Enough paper to wrap the planet, if anyone still printed them"
},
{
"type": "metric",
"title": "Average Coffee per Report",
"value": 0.3,
"severity": "warning",
"interpretation": "Down from 4.7 cups — coffee shops near tech offices report a slight panic"
},
{
"type": "metric",
"title": "Rage-Quits Caused by PDF Libraries",
"value": 2,
"severity": "error",
"interpretation": "Both happened while installing an old PDF toolchain on a fresh laptop"
},
{
"type": "title",
"content": "Before and After"
},
{
"type": "subtitle",
"content": "A tale of two workflows"
},
{
"type": "table",
"title": "Life Before vs. After json2pdf",
"headers": ["Activity", "Before", "After", "Mood"],
"rows": [
["Building an invoice", "3 days", "12 minutes", { "text": "Ecstatic", "severity": "success", "variant": "soft" }],
["Fixing a broken table", "A sprint", "It didn't break", { "text": "Suspicious", "severity": "info", "variant": "outline" }],
["Adding a chart", "New library + 2 weeks", "One JSON object", { "text": "Smug", "severity": "success", "variant": "solid" }],
["Landscape report", "\"Not supported\"", "\"landscape\": true", { "text": "Free", "severity": "success", "variant": "soft" }],
["Explaining blank pages", "Weekly", "Never", { "text": "Relieved", "severity": "success", "variant": "outline" }],
["Matching the design", "Screenshots with arrows", "Tailwind classes", { "text": "Designer approved", "severity": "info", "variant": "solid" }],
["Friday deploy of the report service", "Terrifying", "Still a little terrifying", { "text": "Honest", "severity": "warning", "variant": "solid" }]
]
},
{
"type": "bullet_points",
"items": [
"<strong>94%</strong> of developers stopped saying \"why is this on page 7\"",
"<strong>81%</strong> deleted a folder called <em>pdf_hacks_DO_NOT_TOUCH</em>",
"<strong>67%</strong> now volunteer to build reports (researchers remain puzzled)",
"<strong>12%</strong> printed a PDF just to frame it"
]
},
{
"type": "title",
"content": "Developers Around the World"
},
{
"type": "bar_chart",
"title": "PDFs Generated per Month (Millions)",
"data": [
{ "label": "Jan", "value": 62 },
{ "label": "Feb", "value": 71 },
{ "label": "Mar", "value": 88 },
{ "label": "Apr", "value": 95 },
{ "label": "May", "value": 103 },
{ "label": "Jun", "value": 117 },
{ "label": "Jul", "value": 121 },
{ "label": "Aug", "value": 134 },
{ "label": "Sep", "value": 142 },
{ "label": "Oct", "value": 158 }
]
},
{
"type": "horizontal_bar",
"title": "Happiness Score by Region (out of 100)",
"labels": [
"Northern Hemisphere of Semicolons",
"Southern Kingdom of Curly Braces",
"The Republic of Tabs",
"United Spaces Federation",
"The Remote Cabin (1 developer)"
],
"values": [91, 88, 84, 86, 100],
"max": 100
},
{
"type": "pie_chart",
"title": "What Developers Do With the Time They Saved",
"data": [
{ "label": "Shipping features", "value": 31 },
{ "label": "Naps", "value": 22 },
{ "label": "Side projects", "value": 18 },
{ "label": "Arguing about tabs vs spaces", "value": 14 },
{ "label": "Touching grass", "value": 9 },
{ "label": "Generating more PDFs", "value": 6 }
]
},
{
"type": "title",
"content": "Meet the Developers"
},
{
"type": "paragraph",
"content": "We followed four (completely fictional) developers for a year to see what changed. Names have been invented to protect the innocent, and also because these people do not exist."
},
{
"type": "table",
"title": "Case Studies",
"headers": ["Developer", "Role", "Biggest Win", "Happiness"],
"rows": [
["Paula Promise", "Senior Engineer", "Replaced a 4,000-line report script with 40 lines of JSON", { "type": "progress", "value": 96 }],
["Kevin Callback", "Intern", "Shipped his first PDF on day one, then asked what the fuss was about", { "type": "progress", "value": 88 }],
["Nina Nullpointer", "Tech Lead", "Got the quarterly report out before the quarter ended", { "type": "progress", "value": 91 }],
["Ricky Regex", "Freelancer", "Charges clients for \"PDF engineering\"; does it in 5 minutes", { "type": "progress", "value": 99, "severity": "success" }]
]
},
{
"type": "radar_chart",
"title": "Developer Superpowers (Before vs. After Is Left as an Exercise)",
"labels": ["Layout", "Charts", "Typography", "Patience", "Sleep", "Confidence"],
"values": [92, 88, 80, 95, 85, 90],
"max": 100
},
{
"type": "scatter_plot",
"title": "Effort vs. Joy",
"x_axis": "Effort (hours per report)",
"y_axis": "Joy (smiles per sprint)",
"positions": [
{ "label": "Paula", "x": 1, "y": 42 },
{ "label": "Kevin", "x": 2, "y": 35 },
{ "label": "Nina", "x": 1.5, "y": 38 },
{ "label": "Ricky", "x": 0.2, "y": 50 },
{ "label": "Old way", "x": 11, "y": 3 }
]
},
{
"type": "title",
"content": "Testimonials"
},
{
"type": "html",
"content": "<div class=\"grid grid-cols-2 gap-4\"><figure class=\"rounded-xl bg-blue-50 p-5 ring-1 ring-blue-200\"><blockquote class=\"text-slate-800\">\"I sent JSON and got back a PDF that looked better than our website. I need to have a talk with our frontend team.\"</blockquote><figcaption class=\"mt-3 text-sm font-semibold text-blue-700\">— Paula Promise, fictional Senior Engineer</figcaption></figure><figure class=\"rounded-xl bg-emerald-50 p-5 ring-1 ring-emerald-200\"><blockquote class=\"text-slate-800\">\"My manager asked for the report in landscape. I changed one boolean. I took the rest of the day off.\"</blockquote><figcaption class=\"mt-3 text-sm font-semibold text-emerald-700\">— Nina Nullpointer, imaginary Tech Lead</figcaption></figure><figure class=\"rounded-xl bg-amber-50 p-5 ring-1 ring-amber-200\"><blockquote class=\"text-slate-800\">\"I used to print PDFs, sign them, and scan them back. Now I just... don't.\"</blockquote><figcaption class=\"mt-3 text-sm font-semibold text-amber-700\">— Kevin Callback, made-up Intern</figcaption></figure><figure class=\"rounded-xl bg-rose-50 p-5 ring-1 ring-rose-200\"><blockquote class=\"text-slate-800\">\"Clients think I'm a genius. Please don't tell them about json2pdf.\"</blockquote><figcaption class=\"mt-3 text-sm font-semibold text-rose-700\">— Ricky Regex, nonexistent Freelancer</figcaption></figure></div>"
},
{
"type": "velocimeter",
"title": "Overall Developer Joy",
"value": 9.2,
"min": 0,
"max": 10
},
{
"type": "title",
"content": "Recommendations"
},
{
"type": "numbered_list",
"items": [
"Stop generating PDFs by hand. Your future self is begging you.",
"Use page breaks responsibly. Not every chart needs its own page (most do, though).",
"Pick one font and commit to it. Comic Sans is not a personality.",
"Put the time you save into something meaningful, like a nap or a side project you'll abandon in March.",
"Tell a friend. Friends don't let friends write PDF layout code in 2026."
]
},
{
"type": "html",
"content": "<div class=\"mt-4 flex items-center justify-between gap-4 rounded-2xl bg-gradient-to-r from-slate-900 to-blue-700 px-6 py-5 text-white\"><div><p class=\"text-lg font-semibold\">Ready to change your life?</p><p class=\"text-sm text-blue-100\">POST your JSON to <code class=\"rounded bg-white/15 px-1\">/api/generate-pdf</code> and see what happens.</p></div><span class=\"rounded-full bg-white/20 px-4 py-1 text-sm font-medium\">It's free</span></div>"
}
]