[Plugin] PDF Creator

0 favourites
From the Asset Store
Game rank and league badge creator mega asset pack
  • 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 !

    <img src="http://dl.dropbox.com/u/1412774/C2PDFCreatorDemo/demo.png" border="0">

    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 ! <img src="smileys/smiley2.gif" border="0" align="middle"> 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 ! <img src="smileys/smiley2.gif" border="0" align="middle">

  • it seems like a great plugin.

    Just guys (dev' mates), please think about the icon. Don't put the default one ;)

  • septeven : yeah, I know about the icon, and it's not the first you warn us about it ! <img src="smileys/smiley2.gif" border="0" align="middle" />

    However, I'm better at coding than drawing. Do you have a source for clean, public domain or Creative Commons icons we can use ?

  • 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). ;)

  • septeven

    Or you might provide one icon for

    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. <img src="smileys/smiley36.gif" border="0" align="middle" />

  • 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.

    <img src="http://dl.dropbox.com/u/57899112/PDFPlugin.png" border="0" />

  • 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 ?

  • I don't mind at all. If you want what I have in a vector format, just let me know.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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 ;)).

  • 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.

    Subscribe to Construct videos now
  • Pode, nice, which could be used for printing out a results or leaderboard within a game I imagine, thanks.

  • nice share

  • Nice one, helpful for educational stuff where you want to print out score sheets!

  • Hi, Pode, great plugin. Very usefull in my current project. Is it possible to change font size? If not, i will try to use together with the canvas plugin and render the canvas inside the PDF and see what happens.

  • Hi Pode,

    Just a little report. I'm having problems with the pdf creator - it works fine in preview, but not once deployed as an html5 website.

    Your demo (linked in your first post) is fine, but if I redeploy that, the pdf box remains blank, and the full screen isn't generated. Here's the link to my dropbox version. All I did was re-export your capx example.

    For information, I'm using the current stable version of Construct 2 (release 158 64 bit) and I'm using Chrome.

    I really like this idea - I'm producing educational games, and would love to generate an exportable certificate at the end of a quiz.

    Regards,

    Paulh

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)