Organize generator test (#1098)

* remove old japanese template

* Add new image snapshots and update font references in tests

* Refactor code structure for improved readability and maintainability
This commit is contained in:
Kyohei Fukuda
2025-06-27 16:59:02 +09:00
committed by GitHub
parent 721485fbe7
commit 41b8dd970c
107 changed files with 158 additions and 21521 deletions

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

@@ -3,12 +3,12 @@ import * as path from 'path';
import { getDynamicTemplate } from '../src/dynamicTemplate.js';
import { Template, Schema, Font } from '../src/index.js';
const sansData = readFileSync(path.join(__dirname, `/assets/fonts/SauceHanSansJP.ttf`));
const serifData = readFileSync(path.join(__dirname, `/assets/fonts/SauceHanSerifJP.ttf`));
const sansData = readFileSync(path.join(__dirname, `/assets/fonts/NotoSans-Regular.ttf`));
const serifData = readFileSync(path.join(__dirname, `/assets/fonts/NotoSerif-Regular.ttf`));
const getSampleFont = (): Font => ({
SauceHanSansJP: { fallback: true, data: sansData },
SauceHanSerifJP: { data: serifData },
NotoSans: { fallback: true, data: sansData },
NotoSerif: { data: serifData },
});
describe('getDynamicTemplate', () => {

View File

@@ -20,12 +20,12 @@ import {
getB64BasePdf,
} from '../src/index.js';
const sansData = readFileSync(path.join(__dirname, `/assets/fonts/SauceHanSansJP.ttf`));
const serifData = readFileSync(path.join(__dirname, `/assets/fonts/SauceHanSerifJP.ttf`));
const sansData = readFileSync(path.join(__dirname, `/assets/fonts/NotoSans-Regular.ttf`));
const serifData = readFileSync(path.join(__dirname, `/assets/fonts/NotoSerif-Regular.ttf`));
const getSampleFont = (): Font => ({
SauceHanSansJP: { fallback: true, data: sansData },
SauceHanSerifJP: { data: serifData },
NotoSans: { fallback: true, data: sansData },
NotoSerif: { data: serifData },
});
const getTemplate = (): Template => ({
@@ -36,7 +36,7 @@ const getTemplate = (): Template => ({
name: 'a',
content: 'a',
type: 'text',
fontName: 'SauceHanSansJP',
fontName: 'NotoSans',
position: { x: 0, y: 0 },
width: 100,
height: 100,
@@ -299,8 +299,8 @@ describe('checkFont test', () => {
test('success test: fontName in Schemas(not fallback font)', () => {
const getFont = (): Font => ({
SauceHanSansJP: { data: sansData },
SauceHanSerifJP: { fallback: true, data: serifData },
NotoSans: { data: sansData },
NotoSerif: { fallback: true, data: serifData },
});
try {
@@ -313,8 +313,8 @@ describe('checkFont test', () => {
test('fail test: no fallback font', () => {
const getFont = (): Font => ({
SauceHanSansJP: { data: sansData },
SauceHanSerifJP: { data: serifData },
NotoSans: { data: sansData },
NotoSerif: { data: serifData },
});
try {
@@ -330,8 +330,8 @@ Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`
test('fail test: too many fallback font', () => {
const getFont = (): Font => ({
SauceHanSansJP: { data: sansData, fallback: true },
SauceHanSerifJP: { data: serifData, fallback: true },
NotoSans: { data: sansData, fallback: true },
NotoSerif: { data: serifData, fallback: true },
});
try {
@@ -354,7 +354,7 @@ Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`
name: 'a',
type: 'text',
content: 'a',
fontName: 'SauceHanSansJP2',
fontName: 'NotoSans2',
position: { x: 0, y: 0 },
width: 100,
height: 100,
@@ -376,7 +376,7 @@ Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`
fail();
} catch (e: any) {
expect(e.message).toEqual(
`[@pdfme/common] SauceHanSansJP2 of template.schemas is not found in font.
`[@pdfme/common] NotoSans2 of template.schemas is not found in font.
Check this document: https://pdfme.com/docs/custom-fonts`
);
}
@@ -391,7 +391,7 @@ Check this document: https://pdfme.com/docs/custom-fonts`
name: 'a',
type: 'text',
content: 'a',
fontName: 'SauceHanSansJP2',
fontName: 'NotoSans2',
position: { x: 0, y: 0 },
width: 100,
height: 100,
@@ -400,7 +400,7 @@ Check this document: https://pdfme.com/docs/custom-fonts`
name: 'b',
type: 'text',
content: 'b',
fontName: 'SauceHanSerifJP2',
fontName: 'NotoSerif2',
position: { x: 0, y: 0 },
width: 100,
height: 100,
@@ -414,7 +414,7 @@ Check this document: https://pdfme.com/docs/custom-fonts`
fail();
} catch (e: any) {
expect(e.message).toEqual(
`[@pdfme/common] SauceHanSansJP2,SauceHanSerifJP2 of template.schemas is not found in font.
`[@pdfme/common] NotoSans2,NotoSerif2 of template.schemas is not found in font.
Check this document: https://pdfme.com/docs/custom-fonts`
);
}

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -1,593 +0,0 @@
{
"team": "labelmake",
"tags": [
"宛名ラベル"
],
"description": "[A-one エーワン ラベルシール 12面 22シート 72312](https://amzn.to/2wZvuR1)に対応した書式です。 12面の宛名ラベルを作成できます。 <u>印刷サイズ:A4(210mmx297mm)</u>",
"photo": "",
"createdAt": null,
"updatedAt": null,
"name": "Aone72312宛名",
"id": "a489701b-d735-4d3f-b6da-abde00b2b431",
"basePdf": "data:application/pdf;base64,JVBERi0xLjMKJf////8KOSAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9jYSAxCi9DQSAxCj4+CmVuZG9iago4IDAgb2JqCjw8Ci9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL01lZGlhQm94IFswIDAgNTk1LjI2NiA4NDEuODc2Ml0KL0NvbnRlbnRzIDYgMCBSCi9SZXNvdXJjZXMgNyAwIFIKPj4KZW5kb2JqCjcgMCBvYmoKPDwKL1Byb2NTZXQgWy9QREYgL1RleHQgL0ltYWdlQiAvSW1hZ2VDIC9JbWFnZUldCi9FeHRHU3RhdGUgPDwKL0dzMSA5IDAgUgo+PgovWE9iamVjdCA8PAovSTEgNSAwIFIKPj4KPj4KZW5kb2JqCjYgMCBvYmoKPDwKL0xlbmd0aCA2MAovRmlsdGVyIC9GbGF0ZURlY29kZQo+PgpzdHJlYW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0KZW5kb2JqCnhyZWYKMCAxNQowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDA2ODYgMDAwMDAgbiAKMDAwMDAwMDc0MyAwMDAwMCBuIAowMDAwMDAwNjI0IDAwMDAwIG4gCjAwMDAwMDA2MDMgMDAwMDAgbiAKMDAwMDAwMDk3OCAwMDAwMCBuIAowMDAwMDAwMjk4IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDA2NSAwMDAwMCBuIAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDA1MjcgMDAwMDAgbiAKMDAwMDAwMDQyOSAwMDAwMCBuIAowMDAwMDAwNDYwIDAwMDAwIG4gCjAwMDAwMDA0OTEgMDAwMDAgbiAKMDAwMDAwMDc5MCAwMDAwMCBuIAp0cmFpbGVyCjw8Ci9TaXplIDE1Ci9Sb290IDMgMCBSCi9JbmZvIDEwIDAgUgovSUQgWzwzYjk2ODRkZDk1Y2QwNGY1OTYxYmRlOTU5MmQyMDU2Zj4gPDNiOTY4NGRkOTVjZDA0ZjU5NjFiZGU5NTkyZDIwNTZmPl0KPj4Kc3RhcnR4cmVmCjExNjUKJSVFT0YK",
"schemas": [
[
{
"position": {
"x": 23.5,
"y": 28.5
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{1}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 38.5
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{1}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 48.5
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{1}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 70.8
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{2}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 80.8
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{2}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 90.8
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{2}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 113.1
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{3}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 123.1
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{3}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 133.1
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{3}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 155.4
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{4}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 165.4
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{4}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 175.4
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{4}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 197.7
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{5}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 207.7
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{5}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 217.7
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{5}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 240
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{6}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 250
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{6}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 23.5,
"y": 260
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{6}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 28.5
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{7}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 38.5
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{7}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 48.5
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{7}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 70.8
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{8}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 80.8
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{8}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 90.8
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{8}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 113.1
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{9}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 123.1
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{9}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 133.1
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{9}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 155.4
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{10}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 165.4
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{10}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 175.4
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{10}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 197.7
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{11}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 207.7
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{11}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 217.7
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{11}3行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 240
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "3-5-5 Iwamoto-cho, Chiyoda-ku",
"name": "{12}1行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 250
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "Tokyo 101-0032, Japan",
"name": "{12}2行",
"fontName": "Roboto"
},
{
"position": {
"x": 111.1,
"y": 260
},
"width": 77.8,
"height": 10,
"alignment": "left",
"type": "text",
"fontSize": 14.5,
"characterSpacing": 0,
"lineHeight": 0.7,
"content": "A-one Co., Ltd",
"name": "{12}3行",
"fontName": "Roboto"
}
]
]
}

View File

File diff suppressed because one or more lines are too long

View File

@@ -1,36 +1,5 @@
import { Template } from '@pdfme/common';
const = require('./レターパック.json') as Template;
const = require('./レターパックライト.json') as Template;
const = require('./レターパックプラス.json') as Template;
const 8 = require('./宛名8面.json') as Template;
const 24 = require('./装飾なしラベル24面.json') as Template;
const 24 = require('./装飾なしラベル24面中央揃え.json') as Template;
const = require('./スマートレター.json') as Template;
const 24 = require('./ストライプラベル24面.json') as Template;
const 24 = require('./フレームラベル24面.json') as Template;
const 24 = require('./シンプルラベル24面.json') as Template;
const 便 = require('./郵便はがき横書き.json') as Template;
const 3 = require('./長形3号封筒.json') as Template;
const 3 = require('./洋長3号封筒.json') as Template;
const 2 = require('./角形2号封筒.json') as Template;
const = require('./名刺サイズの名札.json') as Template;
const connpass名札 = require('./connpass名札.json') as Template;
const = require('./ゆうパケット.json') as Template;
const Aone31555QRコード = require('./Aone31555QRコード.json') as Template;
const Aone31553QRコード = require('./Aone31553QRコード.json') as Template;
const Aone72230JANコード短縮 = require('./Aone72230JANコード短縮.json') as Template;
const Aone72230JANコード標準 = require('./Aone72230JANコード標準.json') as Template;
const Aone72312宛名 = require('./Aone72312宛名.json') as Template;
const x4 = require('./領収書x4.json') as Template;
const = require('./領収書.json') as Template;
const = require('./表彰状.json') as Template;
const = require('./見積書.json') as Template;
const = require('./請求書.json') as Template;
const = require('./納品書.json') as Template;
const = require('./書類送付状.json') as Template;
const = require('./履歴書.json') as Template;
const = require('./労働条件通知書.json') as Template;
const z97mmx210mm = require('./z97mmx210mm.json') as Template;
const barcodes = require('./barcodes.json') as Template;
const canvasPdf = require('./canvasPdf.json') as Template;
@@ -51,50 +20,6 @@ const preVersion5Format = require('./preVersion5Format.json') as Template;
const segmenterEnglish = require('./segmenterEnglish.json') as Template;
const segmenterJapanese = require('./segmenterJapanese.json') as Template;
export const label = {
8,
24,
24,
24,
24,
24,
便,
,
,
,
,
,
Aone72312宛名,
,
connpass名札,
};
export const envelope = {
3,
3,
2,
};
export const barcode = {
Aone31555QRコード,
Aone31553QRコード,
Aone72230JANコード短縮,
Aone72230JANコード標準,
barcodes,
};
export const business = {
,
x4,
,
,
,
,
,
,
,
};
// These tests are slower, so we allow more time for them to pass
export const textType = {
dynamicFontSizeHorizontal,
@@ -107,6 +32,8 @@ export const textType = {
};
export const other = {
barcodes,
shapes,
test,
preVersion5Format,
z97mmx210mm,
@@ -117,10 +44,6 @@ export const other = {
pdfImage,
};
export const shape = {
shapes,
};
export const segmenter = {
segmenterEnglish,
segmenterJapanese,

View File

@@ -1,594 +0,0 @@
{
"team": "labelmake",
"tags": [
"郵便局"
],
"description": "小さなものの郵送に便利な配送方法です。 ゆうパケットの専用宛名シールは郵便局の窓口にて無料で貰うことができます。 専用宛名シールを家庭用のプリンタに差し込み印刷で、すぐに宛名印刷していただけます。 印刷サイズ:A4(210mmx297mm)",
"photo": "",
"createdAt": null,
"updatedAt": null,
"name": "ゆうパケット",
"fontName": "SauceHanSansJP",
"id": "ゆうパケット",
"basePdf": "data:application/pdf;base64,JVBERi0xLjMKJf////8KOSAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9jYSAxCi9DQSAxCj4+CmVuZG9iago4IDAgb2JqCjw8Ci9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL01lZGlhQm94IFswIDAgNTk1LjI2NiA4NDEuODc2Ml0KL0NvbnRlbnRzIDYgMCBSCi9SZXNvdXJjZXMgNyAwIFIKPj4KZW5kb2JqCjcgMCBvYmoKPDwKL1Byb2NTZXQgWy9QREYgL1RleHQgL0ltYWdlQiAvSW1hZ2VDIC9JbWFnZUldCi9FeHRHU3RhdGUgPDwKL0dzMSA5IDAgUgo+PgovWE9iamVjdCA8PAovSTEgNSAwIFIKPj4KPj4KZW5kb2JqCjYgMCBvYmoKPDwKL0xlbmd0aCA2MAovRmlsdGVyIC9GbGF0ZURlY29kZQo+PgpzdHJlYW0KeJwzVDAAQl1DIGFhYqhnYW5mpJCcy6XvXmyokF7MVchlammqZ2RmBlGG4MBYILWehgou+VyBXABMHQ96CmVuZHN0cmVhbQplbmRvYmoKMTEgMCBvYmoKKGxhYmVsbWFrZS5qcCkKZW5kb2JqCjEyIDAgb2JqCihsYWJlbG1ha2UuanApCmVuZG9iagoxMyAwIG9iagooRDoyMDIwMDcxNzEwMTIwOVopCmVuZG9iagoxMCAwIG9iago8PAovUHJvZHVjZXIgMTEgMCBSCi9DcmVhdG9yIDEyIDAgUgovQ3JlYXRpb25EYXRlIDEzIDAgUgo+PgplbmRvYmoKNCAwIG9iago8PAo+PgplbmRvYmoKMyAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMSAwIFIKL05hbWVzIDIgMCBSCj4+CmVuZG9iagoxIDAgb2JqCjw8Ci9UeXBlIC9QYWdlcw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IDMgMCBSCi9JbmZvIDEwIDAgUgovSUQgWzwxN2ZlNzcyNjViMzI5OTJkMDA3YTVkYWM5MjZhNzU5Mz4gPDE3ZmU3NzI2NWIzMjk5MmQwMDdhNWRhYzkyNmE3NTkzPl0KPj4Kc3RhcnR4cmVmCjExNjUKJSVFT0YK",
"schemas": [
[
{
"position": {
"x": 10,
"y": 3.4
},
"width": 33.32,
"height": 7.61,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "1234567",
"name": "{1}[お届け先]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 13.5
},
"width": 90,
"height": 10,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都東京1-2-3-4\n東京マンション123号",
"name": "{1}[お届け先]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 30
},
"width": 85,
"height": 6.56,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都 出得太",
"name": "{1}[お届け先]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 10,
"y": 54.5
},
"width": 32.79,
"height": 7.35,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "7654321",
"name": "{1}[差出人]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 63.5
},
"width": 70,
"height": 8.41,
"type": "text",
"alignment": "left",
"fontSize": 9,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府大阪1-2-3-4\n大阪マンション123号",
"name": "{1}[差出人]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 74
},
"width": 63.12,
"height": 6.82,
"type": "text",
"alignment": "left",
"fontSize": 10,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府 出得太",
"name": "{1}[差出人]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 10,
"y": 102.5
},
"width": 33.32,
"height": 7.61,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "1234567",
"name": "{2}[お届け先]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 112.1
},
"width": 90,
"height": 10,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都東京1-2-3-4\n東京マンション123号",
"name": "{2}[お届け先]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 128.6
},
"width": 85,
"height": 6.56,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都 出得太",
"name": "{2}[お届け先]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 10,
"y": 153.3
},
"width": 32.79,
"height": 7.35,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "7654321",
"name": "{2}[差出人]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 162.3
},
"width": 70,
"height": 8.41,
"type": "text",
"alignment": "left",
"fontSize": 9,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府大阪1-2-3-4\n大阪マンション123号",
"name": "{2}[差出人]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 173
},
"width": 63.12,
"height": 6.82,
"type": "text",
"alignment": "left",
"fontSize": 10,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府 出得太",
"name": "{2}[差出人]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 10,
"y": 201
},
"width": 33.32,
"height": 7.61,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "1234567",
"name": "{3}[お届け先]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 211.1
},
"width": 90,
"height": 10,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都東京1-2-3-4\n東京マンション123号",
"name": "{3}[お届け先]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 227.6
},
"width": 85,
"height": 6.56,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都 出得太",
"name": "{3}[お届け先]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 10,
"y": 252.5
},
"width": 32.79,
"height": 7.35,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "7654321",
"name": "{3}[差出人]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 261.3
},
"width": 70,
"height": 8.41,
"type": "text",
"alignment": "left",
"fontSize": 9,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府大阪1-2-3-4\n大阪マンション123号",
"name": "{3}[差出人]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 9.2,
"y": 272
},
"width": 63.12,
"height": 6.82,
"type": "text",
"alignment": "left",
"fontSize": 10,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府 出得太",
"name": "{3}[差出人]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 115,
"y": 3.4
},
"width": 33.32,
"height": 7.61,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "1234567",
"name": "{4}[お届け先]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 13.5
},
"width": 90,
"height": 10,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都東京1-2-3-4\n東京マンション123号",
"name": "{4}[お届け先]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 30
},
"width": 85,
"height": 6.56,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都 出得太",
"name": "{4}[お届け先]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 115,
"y": 54.5
},
"width": 32.79,
"height": 7.35,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "7654321",
"name": "{4}[差出人]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 63.5
},
"width": 70,
"height": 8.41,
"type": "text",
"alignment": "left",
"fontSize": 9,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府大阪1-2-3-4\n大阪マンション123号",
"name": "{4}[差出人]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 74
},
"width": 63.12,
"height": 6.82,
"type": "text",
"alignment": "left",
"fontSize": 10,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府 出得太",
"name": "{4}[差出人]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 115,
"y": 102.5
},
"width": 33.32,
"height": 7.61,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "1234567",
"name": "{5}[お届け先]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 112.1
},
"width": 90,
"height": 10,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都東京1-2-3-4\n東京マンション123号",
"name": "{5}[お届け先]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 128.6
},
"width": 85,
"height": 6.56,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都 出得太",
"name": "{5}[お届け先]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 115,
"y": 153.3
},
"width": 32.79,
"height": 7.35,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "7654321",
"name": "{5}[差出人]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 162.3
},
"width": 70,
"height": 8.41,
"type": "text",
"alignment": "left",
"fontSize": 9,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府大阪1-2-3-4\n大阪マンション123号",
"name": "{5}[差出人]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 173
},
"width": 63.12,
"height": 6.82,
"type": "text",
"alignment": "left",
"fontSize": 10,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府 出得太",
"name": "{5}[差出人]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 115,
"y": 201
},
"width": 33.32,
"height": 7.61,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "1234567",
"name": "{6}[お届け先]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 211.1
},
"width": 90,
"height": 10,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都東京1-2-3-4\n東京マンション123号",
"name": "{6}[お届け先]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 227.6
},
"width": 85,
"height": 6.56,
"type": "text",
"alignment": "left",
"fontSize": 13,
"characterSpacing": 0,
"lineHeight": 1,
"content": "東京都 出得太",
"name": "{6}[お届け先]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 115,
"y": 252.5
},
"width": 32.79,
"height": 7.35,
"type": "text",
"alignment": "left",
"fontSize": 15,
"characterSpacing": 5.3,
"lineHeight": 1,
"content": "7654321",
"name": "{6}[差出人]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 261.3
},
"width": 70,
"height": 8.41,
"type": "text",
"alignment": "left",
"fontSize": 9,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府大阪1-2-3-4\n大阪マンション123号",
"name": "{6}[差出人]住所",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 114.2,
"y": 272
},
"width": 63.12,
"height": 6.82,
"type": "text",
"alignment": "left",
"fontSize": 10,
"characterSpacing": 0,
"lineHeight": 1,
"content": "大阪府 出得太",
"name": "{6}[差出人]氏名",
"fontName": "NotoSerifJP"
}
]
]
}

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -1,146 +0,0 @@
{
"team": "labelmake",
"tags": [
"郵便局"
],
"description": "家庭用のプリンタに差し込み印刷で、郵便はがきが印刷できます。 私製はがきには対応していませんのでお間違いのないように。 <u>印刷サイズ:はがき(100mmx148mm)</u>",
"photo": "",
"createdAt": null,
"updatedAt": null,
"name": "郵便はがき横書き",
"id": "郵便はがき横書き",
"fontName": "SauceHanSansJP",
"basePdf": "data:application/pdf;base64,JVBERi0xLjMKJf////8KOSAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9jYSAxCi9DQSAxCj4+CmVuZG9iago4IDAgb2JqCjw8Ci9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL01lZGlhQm94IFswIDAgMjgzLjQ2IDQxOS41MjA4XQovQ29udGVudHMgN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Pj4Kc3RyZWFtCnicYwAAAAEAAQplbmRzdHJlYW0KZW5kb2JqCjUgMCBvYmoKPDwKL1R5cGUgL1hPYmplY3QKL1N1YnR5cGUgL0ltYWdlCi9CaXRzUGVyQ29tcG9uZW50IDgKL1dpZHRoIDEKL0hlaWdodCAxCi9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9Db2xvclNwYWNlIC9EZXZpY2VHcmF5Ci9TTWFzayAxNCAwIFIKL0xlbmd0aCA5Cj4+CnN0cmVhbQp4nGMAAAABAAEKZW5kc3RyZWFtCmVuZG9iagp4cmVmCjAgMTUKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwNjg0IDAwMDAwIG4gCjAwMDAwMDA3NDEgMDAwMDAgbiAKMDAwMDAwMDYyMiAwMDAwMCBuIAowMDAwMDAwNjAxIDAwMDAwIG4gCjAwMDAwMDA5NzYgMDAwMDAgbiAKMDAwMDAwMDI5NyAwMDAwMCBuIAowMDAwMDAwMTc3IDAwMDAwIG4gCjAwMDAwMDAwNjUgMDAwMDAgbiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwNTI1IDAwMDAwIG4gCjAwMDAwMDA0MjcgMDAwMDAgbiAKMDAwMDAwMDQ1OCAwMDAwMCBuIAowMDAwMDAwNDg5IDAwMDAwIG4gCjAwMDAwMDA3ODggMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSAxNQovUm9vdCAzIDAgUgovSW5mbyAxMCAwIFIKL0lEIFs8M2UxMWYwZWY2NThlMDgxODk4ODBhMWZhN2FhMmRkMjc+IDwzZTExZjBlZjY1OGUwODE4OTg4MGExZmE3YWEyZGQyNz5dCj4+CnN0YXJ0eHJlZgoxMTYzCiUlRU9GCg==",
"schemas": [
[
{
"position": {
"x": 45,
"y": 10
},
"width": 50,
"alignment": "left",
"fontSize": 22.9,
"characterSpacing": 7.4,
"type": "text",
"height": 10,
"lineHeight": 1,
"content": "1234567",
"name": "[お届け先]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 17,
"y": 38
},
"width": 67.87,
"alignment": "left",
"fontSize": 11,
"characterSpacing": 0,
"type": "text",
"height": 6.02,
"lineHeight": 1,
"content": "東京都東京1-2-3-4",
"name": "[お届け先]住所1",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 20,
"y": 44
},
"width": 64.99,
"alignment": "left",
"fontSize": 10,
"characterSpacing": 0,
"type": "text",
"height": 9.73,
"lineHeight": 1,
"content": "東京マンション123号",
"name": "[お届け先]住所2",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 20,
"y": 53.9
},
"width": 65,
"alignment": "left",
"fontSize": 19,
"characterSpacing": 0,
"type": "text",
"height": 53.65,
"lineHeight": 1,
"content": "東京都 出得太 様",
"name": "[お届け先]氏名",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 6,
"y": 136.5
},
"width": 29.63,
"alignment": "left",
"fontSize": 15,
"characterSpacing": 3.6,
"type": "text",
"height": 7.61,
"lineHeight": 1,
"content": "7654321",
"name": "[差出人]郵便番号",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 6.02,
"y": 115
},
"width": 88.98,
"alignment": "right",
"fontSize": 8,
"characterSpacing": 0,
"type": "text",
"height": 5.23,
"lineHeight": 1,
"content": "大阪府大阪1-2-3-4",
"name": "[差出人]住所1",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 5.98,
"y": 120
},
"width": 89.02,
"alignment": "right",
"fontSize": 8,
"characterSpacing": 0,
"type": "text",
"height": 8.41,
"lineHeight": 1,
"content": "大阪マンション123号\n大阪マンション123号",
"name": "[差出人]住所2",
"fontName": "NotoSerifJP"
},
{
"position": {
"x": 5.98,
"y": 128.01
},
"width": 89.02,
"alignment": "right",
"fontSize": 17,
"characterSpacing": 0,
"type": "text",
"height": 8.67,
"lineHeight": 1,
"content": "大阪府 出得太",
"name": "[差出人]氏名",
"fontName": "NotoSerifJP"
}
]
]
}

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -101,7 +101,7 @@ describe('generate integrate test', () => {
describe('use fontSubset template', () => {
test(`sample`, async () => {
const inputs = [{ field1: 'SauceHanSansJP', field2: 'SauceHanSerifJP' }];
const inputs = [{ field1: 'NotoSansJP', field2: 'NotoSerifJP' }];
const template: Template = {
basePdf: BLANK_PDF,
schemas: [
@@ -113,7 +113,7 @@ describe('generate integrate test', () => {
position: { x: 30, y: 30 },
width: 100,
height: 20,
fontName: 'SauceHanSansJP',
fontName: 'NotoSansJP',
},
{
name: 'field2',
@@ -122,25 +122,25 @@ describe('generate integrate test', () => {
position: { x: 60, y: 60 },
width: 100,
height: 20,
fontName: 'SauceHanSerifJP',
fontName: 'NotoSerifJP',
},
],
],
};
jest.setTimeout(30000);
const { SauceHanSansJP, SauceHanSerifJP } = getFont();
const font = getFont();
const pdf = await generate({
inputs,
template,
options: {
font: {
SauceHanSansJP: {
data: SauceHanSansJP.data,
NotoSansJP: {
...font.NotoSansJP,
fallback: true,
subset: false,
},
SauceHanSerifJP: {
data: SauceHanSerifJP.data,
NotoSerifJP: {
...font.NotoSerifJP,
subset: false,
},
},
@@ -204,8 +204,6 @@ ERROR MESSAGE: Array must contain at least 1 element(s)
};
const font = getFont();
font.Roboto.fallback = false;
font.SauceHanSansJP.fallback = false;
font.SauceHanSerifJP.fallback = false;
try {
await generate({ inputs, template, options: { font } });
fail();
@@ -234,9 +232,9 @@ Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`
],
};
const font = getFont();
font.Roboto.fallback = false;
font.SauceHanSansJP.fallback = true;
font.SauceHanSerifJP.fallback = true;
// Set multiple fonts to have fallback = true to test the error
font.Roboto.fallback = true;
font.NotoSansJP = { ...font.NotoSansJP, fallback: true };
try {
await generate({ inputs, template, options: { font } });
fail();
@@ -257,7 +255,7 @@ Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`
name: 'a',
type: 'text',
content: '',
fontName: 'SauceHanSansJP2',
fontName: 'DUMMY_FONT',
position: { x: 0, y: 0 },
width: 100,
height: 100,
@@ -278,7 +276,7 @@ Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`
fail();
} catch (e: any) {
expect(e.message).toEqual(
`[@pdfme/common] SauceHanSansJP2 of template.schemas is not found in font.
`[@pdfme/common] DUMMY_FONT of template.schemas is not found in font.
Check this document: https://pdfme.com/docs/custom-fonts`
);
}

Some files were not shown because too many files have changed in this diff Show More