cesarvr / pdf-generator

Cordova plugin to generate pdf in the client-side
MIT License
106 stars 62 forks source link

Is it possible to generate header and footer? #75

Open adrianjarc opened 6 years ago

adrianjarc commented 6 years ago

I have a document consisting of header, content, and footer (each has its own separate html).

Is it possible to call function fromData somehow like this: pdf.fromData({header: '...', content: '...', footer: '...'})?

Also is it anyhow possible to add page numbering?

cesarvr commented 6 years ago

No is not possible at the moment, because the API is basically a WYSIWYG from a webpage, the API is using a browser to render the content then it creates a PDF base on that content.

If you want you can create a wrapper library that take 3 content (header, content, footer) and merge it together to create one page.