Posted At : May 10, 2008 1:25 PM
4 Comments
I've been using them for a project and all was going well until we hit a limitation in the libraries. We can do rich formatting and we can do automatic line wrapping and pagination, but we can't do the both together.
This would have been an enormous problem if this was a piece of commercial software as we would be completely at the mercy of the creators. However, as it is Open Source we have access to the code and we can extend it as we see fit.
And that's exactly what we did. I've added a new version of the writeText() method called very imaginatively writeText2().
It takes the same parameters but instead of taking a standard string it will render a string that has html markup. I.e. you can put a <b> tag in and your text will be bold. Eg:
For the curious you can download a sample document generated by it.
It currently supports the following tags:
The code still needs a some cleanup and more testing but it seems to be reliable now.
The two files that were changed are available for download. Or alternatively you can download the full version with changes included. Give it a try and let me know what you think.
Cheers, Mark Lynch
4 Comments
Hi...
Congratulation for your script!
I need justify the writeText. All my text will justify. Can you help me?
Jean
What do I have to do with the changed files in my Flex app in order to be able to use the writeText2() function???
I tried adding the files to org>alivepdf>pdf , but Flex did not recognize the new function. The two are actionscript files while everything else in org>alivepdf is HTML extension.
I'd really appreciate your help with this.
Thanks.
Catalin.
Dude. If I could kiss you, I would!
Thanks for helping out with the alivePDF community!
Thanks a lot!
Please note that if the second parameter start right with <center> like this:
pdf.writeText2 ( 16, " <center>center it</center>");
it causes "null object refference" error.