Updates
9
imgs/devin.svg
Normal file
|
After Width: | Height: | Size: 94 KiB |
@@ -6,7 +6,7 @@
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>pdfme Playground</title>
|
||||
<script type="module" crossorigin src="/assets/index-06f0d332.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-6a0a3a48.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-25ceb472.css">
|
||||
</head>
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
"name": "invoice",
|
||||
"author": "hand-dot"
|
||||
},
|
||||
{
|
||||
"name": "quotes",
|
||||
"author": "Devin AI"
|
||||
},
|
||||
{
|
||||
"name": "pedigree",
|
||||
"author": "hand-dot"
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
"y": 191.58
|
||||
},
|
||||
"content": "Thank you!",
|
||||
"width": 52.67,
|
||||
"width": 170,
|
||||
"height": 20,
|
||||
"rotate": 0,
|
||||
"alignment": "left",
|
||||
|
||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
569
template-assets/quotes/template.json
Normal file
@@ -0,0 +1,569 @@
|
||||
{
|
||||
"author": "Devin AI",
|
||||
"schemas": [
|
||||
[
|
||||
{
|
||||
"type": "svg",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 20
|
||||
},
|
||||
"content": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 12.75 11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 0 1-1.043 3.296 3.745 3.745 0 0 1-3.296 1.043A3.745 3.745 0 0 1 12 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 0 1-3.296-1.043 3.745 3.745 0 0 1-1.043-3.296A3.745 3.745 0 0 1 3 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 0 1 1.043-3.296 3.746 3.746 0 0 1 3.296-1.043A3.746 3.746 0 0 1 12 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 0 1 3.296 1.043 3.746 3.746 0 0 1 1.043 3.296A3.745 3.745 0 0 1 21 12Z\" />\n</svg>\n",
|
||||
"width": 23.86,
|
||||
"height": 23.86,
|
||||
"readOnly": true,
|
||||
"name": "logo"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"position": {
|
||||
"x": 120.13,
|
||||
"y": 20
|
||||
},
|
||||
"content": "QUOTE",
|
||||
"width": 69.87,
|
||||
"height": 22.68,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 40,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"fontName": "",
|
||||
"name": "head"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 57.88
|
||||
},
|
||||
"content": "Prepared for:",
|
||||
"width": 84.69,
|
||||
"height": 9.42,
|
||||
"rotate": 0,
|
||||
"alignment": "left",
|
||||
"verticalAlignment": "top",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"fontName": "",
|
||||
"name": "preparedForLabel"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"content": "Imani Olowe \n+123-456-7890 \n63 Ivy Road, Hawkville, GA, USA 31036",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 67.94
|
||||
},
|
||||
"width": 84.95,
|
||||
"height": 34.07,
|
||||
"rotate": 0,
|
||||
"alignment": "left",
|
||||
"verticalAlignment": "top",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"dynamicFontSize": {
|
||||
"min": 3,
|
||||
"max": 13,
|
||||
"fit": "vertical"
|
||||
},
|
||||
"fontName": "",
|
||||
"name": "preparedForInput"
|
||||
},
|
||||
{
|
||||
"type": "multiVariableText",
|
||||
"position": {
|
||||
"x": 119.87,
|
||||
"y": 67.88
|
||||
},
|
||||
"content": "{\"QuoteNo\":\"12345\",\"Date\":\"16 June 2025\",\"ValidUntil\":\"16 July 2025\"}",
|
||||
"width": 70.13,
|
||||
"height": 33.52,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "top",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1.5,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"text": "Quote No.{QuoteNo}\n{Date}\nValid Until: {ValidUntil}",
|
||||
"variables": [
|
||||
"QuoteNo",
|
||||
"Date",
|
||||
"ValidUntil"
|
||||
],
|
||||
"fontName": "",
|
||||
"name": "quoteInfo"
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 110.81
|
||||
},
|
||||
"width": 170,
|
||||
"height": 45.75920000000001,
|
||||
"content": "[[\"Eggshell Camisole Top\",\"1\",\"123\",\"123\"],[\"Cuban Collar Shirt\",\"2\",\"127\",\"254\"]]",
|
||||
"showHead": true,
|
||||
"head": [
|
||||
"Item",
|
||||
"Quantity",
|
||||
"Unit Price",
|
||||
"Total"
|
||||
],
|
||||
"headWidthPercentages": [
|
||||
49.538325694806396,
|
||||
17.962830593295262,
|
||||
19.26354959425127,
|
||||
13.23529411764708
|
||||
],
|
||||
"fontName": "",
|
||||
"tableStyles": {
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#000000"
|
||||
},
|
||||
"headStyles": {
|
||||
"fontName": "",
|
||||
"fontSize": 13,
|
||||
"characterSpacing": 0,
|
||||
"alignment": "center",
|
||||
"verticalAlignment": "middle",
|
||||
"lineHeight": 1,
|
||||
"fontColor": "#000000",
|
||||
"borderColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"borderWidth": {
|
||||
"top": 0.1,
|
||||
"right": 0,
|
||||
"bottom": 0,
|
||||
"left": 0
|
||||
},
|
||||
"padding": {
|
||||
"top": 5,
|
||||
"right": 5,
|
||||
"bottom": 5,
|
||||
"left": 5
|
||||
}
|
||||
},
|
||||
"bodyStyles": {
|
||||
"fontName": "",
|
||||
"fontSize": 13,
|
||||
"characterSpacing": 0,
|
||||
"alignment": "center",
|
||||
"verticalAlignment": "middle",
|
||||
"lineHeight": 1,
|
||||
"fontColor": "#000000",
|
||||
"borderColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"alternateBackgroundColor": "",
|
||||
"borderWidth": {
|
||||
"top": 0.1,
|
||||
"right": 0,
|
||||
"bottom": 0.1,
|
||||
"left": 0
|
||||
},
|
||||
"padding": {
|
||||
"top": 6,
|
||||
"right": 5,
|
||||
"bottom": 5,
|
||||
"left": 5
|
||||
}
|
||||
},
|
||||
"columnStyles": {
|
||||
"alignment": {
|
||||
"0": "left",
|
||||
"3": "right"
|
||||
}
|
||||
},
|
||||
"name": "orders",
|
||||
"readOnly": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"position": {
|
||||
"x": 133.01,
|
||||
"y": 156.89
|
||||
},
|
||||
"content": "Subtotal",
|
||||
"width": 25.42,
|
||||
"height": 8.09,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"fontName": "",
|
||||
"name": "subtotalLabel"
|
||||
},
|
||||
{
|
||||
"type": "multiVariableText",
|
||||
"position": {
|
||||
"x": 118.73,
|
||||
"y": 164.98
|
||||
},
|
||||
"name": "taxInput",
|
||||
"content": "{\"rate\":\"10\"}",
|
||||
"width": 40.2,
|
||||
"height": 9.18,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"readOnly": false,
|
||||
"text": "Tax ({rate}%)",
|
||||
"variables": [
|
||||
"rate"
|
||||
],
|
||||
"required": false,
|
||||
"dynamicFontSize": {
|
||||
"min": 4,
|
||||
"max": 13,
|
||||
"fit": "vertical"
|
||||
},
|
||||
"fontName": ""
|
||||
},
|
||||
{
|
||||
"type": "line",
|
||||
"position": {
|
||||
"x": 132.09,
|
||||
"y": 174.35
|
||||
},
|
||||
"width": 52.91,
|
||||
"height": 0.1,
|
||||
"rotate": 0,
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"color": "#000000",
|
||||
"name": "line",
|
||||
"content": ""
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"content": "{orders.reduce((sum, item) => sum + parseFloat(item[1] || 0) * parseFloat(item[2] || 0), 0)}",
|
||||
"position": {
|
||||
"x": 158.79,
|
||||
"y": 157.1
|
||||
},
|
||||
"width": 26.21,
|
||||
"height": 7.56,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"fontName": "",
|
||||
"name": "subtotal",
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"dynamicFontSize": {
|
||||
"min": 4,
|
||||
"max": 13,
|
||||
"fit": "horizontal"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"content": "{Number(subtotal) * Number(taxInput.rate) / 100}",
|
||||
"position": {
|
||||
"x": 158.79,
|
||||
"y": 164.98
|
||||
},
|
||||
"width": 26.21,
|
||||
"height": 8.89,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"fontName": "",
|
||||
"name": "tax",
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"dynamicFontSize": {
|
||||
"min": 4,
|
||||
"max": 13,
|
||||
"fit": "horizontal"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"position": {
|
||||
"x": 131.94,
|
||||
"y": 174.64
|
||||
},
|
||||
"content": "Total",
|
||||
"width": 27.01,
|
||||
"height": 11,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 20,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"fontName": "",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"name": "totalLabel"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"content": "${Number(subtotal) + Number(tax)}",
|
||||
"position": {
|
||||
"x": 159.05,
|
||||
"y": 174.64
|
||||
},
|
||||
"width": 25.95,
|
||||
"height": 11,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 20,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"fontName": "",
|
||||
"name": "total",
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"dynamicFontSize": {
|
||||
"min": 4,
|
||||
"max": 20,
|
||||
"fit": "horizontal"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 191.58
|
||||
},
|
||||
"content": "Thank you for your interest!",
|
||||
"width": 170,
|
||||
"height": 20,
|
||||
"rotate": 0,
|
||||
"alignment": "left",
|
||||
"verticalAlignment": "top",
|
||||
"fontSize": 20,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"fontName": "",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"name": "thankyou"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 232.67
|
||||
},
|
||||
"content": "Terms & Conditions",
|
||||
"width": 84.69,
|
||||
"height": 9.42,
|
||||
"rotate": 0,
|
||||
"alignment": "left",
|
||||
"verticalAlignment": "top",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"fontName": "",
|
||||
"name": "termsLabel"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"content": "This quote is valid for 30 days from the date of issue.\nPayment terms: 50% deposit required to confirm order.\nDelivery: 2-3 weeks after order confirmation.\nPrices subject to change without notice.",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 242.83
|
||||
},
|
||||
"width": 84.95,
|
||||
"height": 34.07,
|
||||
"rotate": 0,
|
||||
"alignment": "left",
|
||||
"verticalAlignment": "top",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"dynamicFontSize": {
|
||||
"min": 3,
|
||||
"max": 13,
|
||||
"fit": "vertical"
|
||||
},
|
||||
"fontName": "",
|
||||
"name": "termsInput"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"position": {
|
||||
"x": 119.33,
|
||||
"y": 248.39
|
||||
},
|
||||
"content": "Samira Hadid",
|
||||
"width": 70.67,
|
||||
"height": 8.36,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "top",
|
||||
"fontSize": 18,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"fontName": "",
|
||||
"name": "shopName"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"position": {
|
||||
"x": 107.69,
|
||||
"y": 256.9
|
||||
},
|
||||
"content": "123 Anywhere St., Any City, ST 12345",
|
||||
"width": 82.31,
|
||||
"height": 20,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "top",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"fontName": "",
|
||||
"name": "shopAddress"
|
||||
}
|
||||
]
|
||||
],
|
||||
"basePdf": {
|
||||
"width": 210,
|
||||
"height": 297,
|
||||
"padding": [
|
||||
20,
|
||||
20,
|
||||
20,
|
||||
20
|
||||
],
|
||||
"staticSchema": [
|
||||
{
|
||||
"name": "line",
|
||||
"type": "line",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 279
|
||||
},
|
||||
"width": 170,
|
||||
"height": 0.2,
|
||||
"rotate": 0,
|
||||
"opacity": 1,
|
||||
"readOnly": true,
|
||||
"color": "#999999",
|
||||
"required": false,
|
||||
"content": ""
|
||||
},
|
||||
{
|
||||
"name": "footerInfo",
|
||||
"type": "text",
|
||||
"content": "Quote No.{quoteInfo.QuoteNo} • {total}USD • Valid until {quoteInfo.ValidUntil}",
|
||||
"position": {
|
||||
"x": 20,
|
||||
"y": 282
|
||||
},
|
||||
"width": 122.51,
|
||||
"height": 10,
|
||||
"rotate": 0,
|
||||
"alignment": "left",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"required": false,
|
||||
"readOnly": true
|
||||
},
|
||||
{
|
||||
"name": "pageNumber",
|
||||
"type": "text",
|
||||
"content": "Page {currentPage} of {totalPages}",
|
||||
"position": {
|
||||
"x": 145,
|
||||
"y": 282
|
||||
},
|
||||
"width": 45,
|
||||
"height": 10,
|
||||
"rotate": 0,
|
||||
"alignment": "right",
|
||||
"verticalAlignment": "middle",
|
||||
"fontSize": 13,
|
||||
"lineHeight": 1,
|
||||
"characterSpacing": 0,
|
||||
"fontColor": "#000000",
|
||||
"backgroundColor": "",
|
||||
"opacity": 1,
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"required": false,
|
||||
"readOnly": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"pdfmeVersion": "5.0.0"
|
||||
}
|
||||
BIN
template-assets/quotes/thumbnail.png
Normal file
|
After Width: | Height: | Size: 82 KiB |