[Plugin] PDF Creator

Post your completed addons to share with the community

Post » Thu Apr 26, 2012 2:15 pm

Release early, release often.

I needed that for a client, so here's a plugin that allows you to create and render PDF inside C2 !

I'm using a project (https://github.com/Marak/pdf.js/ & http://code.google.com/p/jspdf/) which couldn't embed images inside the PDF. So I choose to integrate the JPEG JS encoder from there : www.bytestrom.eu/blog/2009/1120a_jpeg_encoder_for_javascrip). That gave me the possibility to embed those images inside the PDF. (I also committed back the code to the authors of the original lib, so everybody can use it, even outside C2's community...).

So now, you can put some text (choosing the font) onto the PDF, put some Sprites in it, and render it. You can display it inside C2 or render it fullscreen, like in my demo.

It works fine on Chrome, there's some bug with Firefox, so that's why I'm saying I release it early ! However, even in its current state, this can be useful to some people...

If you want to save the PDF ondisk, you can right click on it and save.

The demo : http://dl.dropbox.com/u/1412774/C2PDFCreatorDemo/index.html
The plugin : http://dl.dropbox.com/u/1412774/C2PDFCreatorDemo/pode_pdfcreator.zip
The .capx : http://dl.dropbox.com/u/1412774/C2PDFCreatorDemo/C2PDFCreatorDemo.capx

Edit : when you put text inside the PDF, the coordinates are starting at the top.
When putting images, the coordinate system is starting at the bottom.
Blame the spec ! Pode2012-04-26 14:16:19
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Thu Apr 26, 2012 2:35 pm

it seems like a great plugin.
Just guys (dev' mates), please think about the icon. Don't put the default one ;)
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
45
S
12
G
13
Posts: 628
Reputation: 10,481

Post » Thu Apr 26, 2012 3:00 pm

@septeven : yeah, I know about the icon, and it's not the first you warn us about it !
However, I'm better at coding than drawing. Do you have a source for clean, public domain or Creative Commons icons we can use ?
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Thu Apr 26, 2012 3:08 pm

I usually personaly find them by searching on google.
I don't use icons for commercial products, so I don't really care about legal issues. Maybe I should, but I definitely guess that's not a problem in our case (plugin developers). ;)
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
45
S
12
G
13
Posts: 628
Reputation: 10,481

Post » Thu Apr 26, 2012 11:10 pm

@septeven

Or you might provide one icon for @Pode.


In my case, I could find icon on network sometimes, sometimes I could not. So I will push a request to my team leader, he will make one for me.
B
105
S
25
G
216
Posts: 4,295
Reputation: 123,644

Post » Thu Apr 26, 2012 11:54 pm

Awesome plugin.

Logos aren't that hard to make. Here's one, but you'd have to get approval from Scirra. Or I can make a cog for you that isn't the same as the scirra cog.

kittiewan2012-04-26 23:59:45
B
30
S
12
G
12
Posts: 281
Reputation: 12,048

Post » Fri Apr 27, 2012 9:17 am

@kittiewan : it's really nice !
Sinc you already made a lot of work, do you mind if I change the cog myself, so there won't be any infringement with scirra ?
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Fri Apr 27, 2012 1:15 pm

I don't mind at all. If you want what I have in a vector format, just let me know.
B
30
S
12
G
12
Posts: 281
Reputation: 12,048

Post » Sat Apr 28, 2012 10:01 am

@kittiewan : if you can provide me the vector format, it's going to be helpful (the version I just tried 2 minutes ago isn't very appealing ;)).
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sat Apr 28, 2012 2:35 pm

Here you go:

pdfpluginlogos.zip

I didn't know if you need a .ai file (illustrator) or .svg file (inkscape) so I've included both.

EDIT: I also included a gear from the Illustrator symbols, and here is a link to a decent tutorial on creating a gear with illustrator's path tools that you could easily customize.

http://www.youtube.com/watch?v=XdEX8Zat37wkittiewan2012-04-28 14:49:23
B
30
S
12
G
12
Posts: 281
Reputation: 12,048

Next

Return to Completed Addons

Who is online

Users browsing this forum: John Wils and 1 guest