[plugin] jsPDF

Post your work in progress addons and get feedback

Post » Thu Jul 03, 2014 3:59 pm

If your're trying with URL like this ( http://i.imgur.com/7ibIp6y.jpg ), it won't work.

You should convert it somehow to Base64 uri, something that looks like this:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg==
Be nice until it's time to not be nice
B
36
S
10
G
9
Posts: 293
Reputation: 6,712

Post » Sun Jul 13, 2014 12:43 am

I've updated the plugin with some new features. Please check the first post for downloads and changelog.

Cheers!
Be nice until it's time to not be nice
B
36
S
10
G
9
Posts: 293
Reputation: 6,712

Post » Mon Jul 14, 2014 2:28 pm

I've been busy to respond, but your plugin is working fine. Tonight i'll check the new version. It is pretty stable for now. Thank you!
B
36
S
5
G
2
Posts: 28
Reputation: 2,448

Post » Sat Aug 02, 2014 11:28 am

@JohnnySheffield Hi, I'm having some difficulties getting this plugin to work on phonegap, is it compatible? I've tried it on other platforms without a problem so I don't think it is user error.
B
12
S
1
Posts: 34
Reputation: 677

Post » Sat Aug 02, 2014 12:35 pm

i havent test it on phonegap yet...

i'll look into phonegap support and report here my findings.
Be nice until it's time to not be nice
B
36
S
10
G
9
Posts: 293
Reputation: 6,712

Post » Sat Sep 20, 2014 5:31 pm

JohnnySheffield

your plugin is in conflict with the filesaver plugin from Pode as soon as i save the pdf.
All works well, until i ad the filesaver plugin to my project.
And for my project i need them both.
hope u can fix it.
B
59
S
21
G
14
Posts: 779
Reputation: 13,927

Post » Tue Sep 23, 2014 5:38 am

Hello, Thank you for your plugin it is very helpful for me to create pdfs. :)

But I have one issue with increasing the table width. I increased the following key property as well as html table width.
margins = {...., width : 1500};
But the table width seems to be same for whatever value given. Please help me increasing the table width as I have large no.of columns to be displayed. Note that, I generate pdfs using landscape view and a4 size (agreed options).

Another issue is that how to break words in headers in pdf file?

Thanks in advance.
B
2
Posts: 1
Reputation: 152

Post » Wed Oct 29, 2014 11:10 am

@Savvy001

Unfortunately, i have some bad news; the problem lies in the libraries used by Filesaver and jsPDF. As it seems, one of the dependencies for jsPDF is actually the filesaver.js used by pode's plugin and conflict arises on global namespace when working with URL variable.

I tried to work around it; in C2 event sheet as well with adapting filesaver.js but with no luck.

@julie12

I'm not sure what do you mean with "increasing the table width. I increased the following key property as well as html table width.".

Are you trying to render .html inside .pdf file using this plugin? The jsPDF library supports this functionality, but i have not managed to implement it in this plugin.
Be nice until it's time to not be nice
B
36
S
10
G
9
Posts: 293
Reputation: 6,712

Post » Sun Nov 02, 2014 12:26 am

I'm having a problem exporting for node webkit. When I try to save this message appears:
Uncaught node.js Error

TypeError: undefined is not a function
at l.vm (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:364:450)
at g.Pl (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:197:159)
at a.tj (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:190:126)
at a.$a (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:189:308)
at l.fr (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:124:210)
at l.cm (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:123:304)
at l.Vo (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:122:376)
at l.trigger (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:122:281)
at m.On (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:346:24)
at d.Vf (file:///C:/Users/Vini/AppData/Local/Temp/nw8708_29817/c2runtime.js:357:64)

What i'm doing wrong since it worked on the construct preview?
B
4
Posts: 7
Reputation: 214

Post » Sun Nov 02, 2014 3:12 am

Sounds like problems with the minifier, try exporting with the option unticked
B
11
S
2
G
1
Posts: 202
Reputation: 1,580

PreviousNext

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest