Jspdf-autotable: Content before autotable

Created on 9 Sep 2014  路  10Comments  路  Source: simonbengtsson/jsPDF-AutoTable

驴Is there a way to add a title and some text before autotable?

Most helpful comment

beforePageContent: function(data) {
doc.setFontSize(12);
doc.setFont("courier");
doc.text("Content X " ,20, 15);
doc.text("Content Y" ,20, 15);
}
What am trying to do here is , Printing the Content Y in the next line of Content X , But it's getting Overlapped

All 10 comments

Btw, thanks for your library.

What I did was to increase the top margin a bit and then write a title with the native jsPDF api. There is an example on how to do this in examples/example.js.

You might find support for this limited right now though. It is very much something I'm working on improving though!

Thank for the advice. Another thing I realized is the support of unicode symbols inside a jsPDF doc.
You can't use for example: \uXXXX to refer symbols from UTF-8.
Btw, Good Work Here!

No that is true, the issue can be tracked here . Swedish and German characters such as 氓盲枚 seem to work fine though.

Better support for this was released in version 1.0. An example "With content" also exist in /examples/examples.js.

Hi Simon , How to add two sentences in pageBeforeContent ?
Ex : 1). content X
2) content Y .
is it possible huh ?

Not sure what you mean. If you have a question about how to do something with the plugin it would be easier if you created a question on stackoverflow with more information. I actively monitor the jspdf-autotable tag.

beforePageContent: function(data) {
doc.setFontSize(12);
doc.setFont("courier");
doc.text("Content X " ,20, 15);
doc.text("Content Y" ,20, 15);
}
What am trying to do here is , Printing the Content Y in the next line of Content X , But it's getting Overlapped

Aha! Make sure you use the doc.text function correctly. Its signature is like this jsPDF.text(x, y, text).

Yes man , You are right . I just Misunderstood that . Thanks Buddy @simonbengtsson

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cwolcott picture cwolcott  路  4Comments

cplaiu picture cplaiu  路  3Comments

sirishasd picture sirishasd  路  4Comments

simonbengtsson picture simonbengtsson  路  5Comments

ultra2 picture ultra2  路  6Comments