Original idea is svg-paper.
This is javascript library merging value to svg template file.
it can be same web browser's looks and printing looks.
Svg template file should be created by inkscape.
npm install
npm run build:prod
cd sample
npm install
npm start
access http://localhost:8080/ by browser
[
{"svgUrl": "someSvgTemplateFile.svg",
"holderMap": {
"%somePlaceHolder%": {
"value": "someValue",
"opt": {
"align": "M",
"width": 30
}
},
"%otherPlaceHolder%": {
"value": ""
},
:
:
}.
{"svgUrl" "otherSvgTemplateFile.svg",
"hoderMap": {
"%somePlaceHolder2%: {
"value": ""
}
:
}
]
"align" specify text align.
'one line text' can hold one character in "sme" (means start, middle, end).
'Multiple line text'(text area) can hold one character in "TMB" (means Top, Middle, Bottom)
"width" specify text width.
"height" specify text area height.
"fontSize" specify font size.