[haXe] pdf generation with alivepdf & haxe

Ian Liu ian.liu88 at gmail.com
Tue Dec 4 02:07:07 CET 2007


GMail screwed my lovely code format :(

On Dec 3, 2007 11:06 PM, Ian Liu <ian.liu88 at gmail.com> wrote:

> Here is a very simple example:
>
>
> // Compile with:
> //   haxe -neko foo.n -main Foo
> // And run with..:
> //   neko foo.n
> class Foo {
>  static function main() {
> var out = neko.io. File <http://haxe.org/api/neko/io/File>.write('foo.txt',
> false);
> // out is a FileOutput <http://haxe.org/api/neko/io/FileOutput>, which
> extends Output <http://haxe.org/api/neko/io/Output>.
> out.write("Hello from neko!");
> out.close();
> }
> }
>
> On Dec 3, 2007 10:30 PM, Jan Viehweger <forum at jan-viehweger.de> wrote:
> > hello list, hello nicolas!
> >
> > this is my very first post to the list - and of coure not the last one,
> > cause haxe rocks and i'm trying find out the whole power of this amazing
> > language.
> >
> > untill now i was one of theese stupid zinc users who spend a lot of
> > money for a buggy tools. i was very frustrated about the poor database
> > features and the missing commandline features which is a must have in a
> > productive workflow. while googeling for some custom sqlite extension
> > for zinc i stumbled over haxe, which supports sqlite by default - and of
> > course "for free"! yes man - this is i was looking for!!! - why nowbody
> > told me before?!
> >
> > now to the point:
> > in many of my applications (of course flash/flex/haxe) i need the
> > possibility to dynamicaly generate pdf's.
> > until now i'didnt find a proper solution, cause haxe (still) does not
> > support this feature (correct if i'm wrong).
> >
> > so my first idea was:
> > using the cli version of php in combination with the fpdf class. ok,
> > this worked somehow but distributing the whole php package was'nt that
> > elegant.
> >
> > second idea:
> > using a very cool tool i found  called BAMBALAM. this is tiny little
> > programm for wrapping php files in a single exe so you can use it as a
> > standalone programm. yes - this was cool for some day's, and it worked.
> > but one thing disappoints me: now i had 3 different languages to handel:
> > actionscript, haxe and php ...
> >
> > third, and last idea:
> > yesterday i found a very amazing project called "ALIVEPDF" on
> > bytearray.org. alivepdf is an actionscript 3 open-source pdf library.
> > alivepdf is based on fpdf - which is a good old friend of mine :+).
> > alivepdf targets to types of pdf generation: LOCAL and REMOTE. the local
>
> > way is done by adobe air. the remote one by a php script.
> > its very easy to create pdf with alivepdf as you can see in
> > videotutorials on the projects website (www.alivepdf.org ). the cool
> > thing is, that you write your whole pdfcode in as3, and for grafix you
> > can use the whole drawing api too!!!
> >
> > so whats the problem now?
> > as i mentioned, saving pdf files local is done by adobe air. but i dont
> > want to use air - couse i'm a haxe guy :+).  i saw in the first
> > videotorial
> > (http://www.alivepdf.org/wp-content/tutorials/alivepdf-tutorial-getting-started.swf
> )
> >
> > that the whole pdfcode is stored in a flash bytearray which is then
> > written into file by an air method. i ask myself if haxe could do this
> > file save stuff to. in the haxe/neko api i found the neko.io class which
> > also has a "writeBytes" method. but as i'm a very first beginner in haxe
> > i dont know how to get started with that feature.
> >
> > here my question: could someone help me ore write a little example which
>
> > produces a simple hello world pdf with alivepdf & haxe?
> > i think this could be very usefull for the whole haxe comunity cause in
> > my opinion this is the first proper solution for generating pdf in haxe.
>
> > it would also be possible to make the alivepdf class available as an
> > haxe lib ...
> >
> > so this for now - sorry for my long post an my bad english.
> > hopefully some is interessted and expirienced enough to help me (and the
>
> > community too)
> >
> > bye janosch,
> >
> >
> > ---------- Forwarded message ----------
> > From: "Dipl. Des. Jan Viehweger" <mail at jan-viehweger.de >
> > To: haxe at lists.motion-twin.com
> > Date: Tue, 04 Dec 2007 01:27:37 +0100
> > Subject: pdf generation with alivepdf & haxe
> > hello list, hello nicolas!
> >
> > this is my very first post to the list - and of coure not the last one,
> > cause haxe rocks and i'm trying find out the whole power of this amazing
> > language.
> >
> > untill now i was one of theese stupid zinc users who spend a lot of
> > money for a buggy tools. i was very frustrated about the poor database
> > features and the missing commandline features which is a must have in a
> > productive workflow. while googeling for some custom sqlite extension
> > for zinc i stumbled over haxe, which supports sqlite by default - and of
> > course "for free"! yes man - this is i was looking for!!! - why nowbody
> > told me before?!
> >
> > now to the point:
> > in many of my applications (of course flash/flex/haxe) i need the
> > possibility to dynamicaly generate pdf's.
> > until now i'didnt find a proper solution, cause haxe (still) does not
> > support this feature (correct if i'm wrong).
> >
> > so my first idea was:
> > using the cli version of php in combination with the fpdf class. ok,
> > this worked somehow but distributing the whole php package was'nt that
> > elegant.
> >
> > second idea:
> > using a very cool tool i found  called BAMBALAM. this is tiny little
> > programm for wrapping php files in a single exe so you can use it as a
> > standalone programm. yes - this was cool for some day's, and it worked.
> > but one thing disappoints me: now i had 3 different languages to handel:
> > actionscript, haxe and php ...
> >
> > third, and last idea:
> > yesterday i found a very amazing project called "ALIVEPDF" on
> > bytearray.org. alivepdf is an actionscript 3 open-source pdf library.
> > alivepdf is based on fpdf - which is a good old friend of mine :+).
> > alivepdf targets to types of pdf generation: LOCAL and REMOTE. the local
>
> > way is done by adobe air. the remote one by a php script.
> > its very easy to create pdf with alivepdf as you can see in
> > videotutorials on the projects website (www.alivepdf.org ). the cool
> > thing is, that you write your whole pdfcode in as3, and for grafix you
> > can use the whole drawing api too!!!
> >
> > so whats the problem now?
> > as i mentioned, saving pdf files local is done by adobe air. but i dont
> > want to use air - couse i'm a haxe guy :+).  i saw in the first
> > videotorial
> > (http://www.alivepdf.org/wp-content/tutorials/alivepdf-tutorial-getting-started.swf
> )
> >
> > that the whole pdfcode is stored in a flash bytearray which is then
> > written into file by an air method. i ask myself if haxe could do this
> > file save stuff to. in the haxe/neko api i found the neko.io class which
> > also has a "writeBytes" method. but as i'm a very first beginner in haxe
> > i dont know how to get started with that feature.
> >
> > here my question: could someone help me ore write a little example which
>
> > produces a simple hello world pdf with alivepdf & haxe?
> > i think this could be very usefull for the whole haxe comunity cause in
> > my opinion this is the first proper solution for generating pdf in haxe.
>
> > it would also be possible to make the alivepdf class available as an
> > haxe lib ...
> >
> > so this for now - sorry for my long post an my bad english.
> > hopefully some is interessted and expirienced enough to help me (and the
>
> > community too)
> >
> > bye janosch,
> >
> >
> >
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20071204/a514ebe1/attachment.htm


More information about the Haxe mailing list