hand-dot / labelmake

labelmake has moved and now available at pdfme / https://github.com/pdfme/pdfme

Home Page:https://labelmake.jp/javascript-pdf-generator-library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template designer not loading saved json template

Borisss opened this issue · comments

Hi, I wanted to load template I did yesterday and modify it slightly but opening it via Load button doesn't do anything and there is no error in the console.

https://labelmake.jp/javascript-pdf-generator-library/template-design/

Can you upload my template json here?

Probable problem is that whatever I insert into the template and save is correctly saved into schemas part but sampledata, columns are always containing only those default aa aaaaaaa values?

Example of saved template where I just added one extra field:

,"schemas":[{"field1":{"type":"text","position":{"x":20,"y":20},"width":100,"height":15,"alignment":"left","fontSize":30,"characterSpacing":0,"lineHeight":1},"field2":{"type":"text","position":{"x":20,"y":35},"width":100,"height":40,"alignment":"left","fontSize":20,"characterSpacing":0,"lineHeight":1},"field3":{"type":"text","position":{"x":112.45,"y":116.95},"width":35,"height":7,"alignment":"left","fontSize":12,"characterSpacing":0,"lineHeight":1}}],"sampledata":[{"field1":"aa","field2":"aaaaaaaaaaaa"}],"columns":["field1","field2"]

@Borisss
sampledata and columns should be corresponds with schemas.

However, in the case you reported, it was a bug in the UI of the template editor, so we fixed it.

Does it work correctly?

Thanks for fast responses!

Now it kind of loads the position and number of fields correctly but ignores the default values and in saved file I still see the same default sampledata and columns

Capture

@Borisss
Sorry...
I had a mistake. so now, you can save and load correctly.
Please try again.