/pdf-template-builder-embeddable

Embeddable version of Pdf Template Builder without external dependencies

Primary LanguageJavaScriptMIT LicenseMIT

What is this

This is the embeddable version of the Pdf Template Builder

Usage

Add the required js in your app.

<script type="text/javascript" src="path/to/pdf-template-builder.min.js"></script> 

Add target element to the DOM.

<div id="target"></div>

Initialize and configure builder.

// 1. Create instance
const builder = new PdfTemplateBuilder();

// 2. Render to the target DOM element
builder.render(document.getElementById('target'));

// 3. Configure
builder.configure({
  language: 'en',
  schema: [],
  onSave: () => {},
  onPreview: () => {}
});

// 4. Optional. Import your already existing template?
builder.importTemplate({...});

Development

There is no much to develop, but you can if you really want.

# start dev server
npm start

# building the minified js under dist
npm run build