AlivePDF, PurePDF and actionscript 3.0

Hi there,
I hope someone can help.. I have created a label generator, basicly the first page is a series of questions, the next page is a rosette and results graphic based on the answers given, this has been done with actionscript 3.0 ( the calculation, of  the answers from the form, activating the graphics (movie_clips) etc.). the next stage is to generate a PDF (of the results page with the rosette and results graphic on it) which can be downloaded or sent. on the surface it seems a relatively simple task, however, the more research i do, the larger the iceberg, i seem to encounter..
my first question is: is this acheivable through alivePDF/PurePDF, is it a pure actionscript 3.0 solution and would i need to reference the libraries, and require read/write/execute permissions (on the web server), does it matter as to the operating system of the web server?
are there any tutorials to steer me in the right direction of how to implement such a solution?
Kind regards
Keith
NB if this is in the wrong forum, i do apologize.

Here's a super rudimentary example to generate a PDF using PurePDF:
// click anywhere
package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.FileReference;
    import flash.utils.ByteArray;
    import org.purepdf.elements.Paragraph;
    import org.purepdf.pdf.PageSize;
    import org.purepdf.pdf.PdfDocument;
    import org.purepdf.pdf.PdfWriter;
    import org.purepdf.pdf.fonts.BaseFont;
    import org.purepdf.pdf.fonts.FontsResourceFactory;
    import org.purepdf.resources.BuiltinFonts;
    public class PurePDFExample extends Sprite {
        public function PurePDFExample():void {
            stage.addEventListener(MouseEvent.CLICK, stageClick);
        private function stageClick(e:MouseEvent):void {
            generatePDF();
        private function generatePDF():void {
            FontsResourceFactory.getInstance().registerFont(BaseFont.HELVETICA, new BuiltinFonts.HELVETICA());
            var bytes:ByteArray = new ByteArray();
            var writer:PdfWriter = PdfWriter.create(bytes, PageSize.A4);
            var document:PdfDocument = writer.pdfDocument;
            document.open();
            document.add(new Paragraph("Hello World!"));
            document.close();
            new FileReference().save(bytes);

Similar Messages

  • PHP and Actionscript 3

    I want to dynamically change the tintColor of a movie clip,
    named toolboxMC_bg based on the value of a php variable $style set
    in s3.php. I'm using actionscript 3. Please help. I just don't know
    how to get flash to get the value of $style. I have attached the
    code I have so far. Thanks.

    I feel that the problem lies with the actionscript not
    receiving the php variable. I have changed the php to read the
    cookie value. Please help! I get no errors in the browser and I get
    undefined in the output window. However I do expect to get
    undefined because I don't expect that flash could read the cookie.
    That part actually makes sense. I know that the color change area
    of the code works because if I change the default value I see a
    change in color. Flash just cannot read my variable for some
    reason. When you view the php page in the browser it successfully
    reads the cookie and shows (in this case the cookie is red)
    flashstyle=red. I have attached the php and actionscript.
    Thanks.

  • Write to and read from TCP/IP address using Flash and Actionscript

    Hi,
    I'm a bit of a newbie with flash and Actionscript. I have been programming for a number of years now, but I have only been messing around with flash since CS4. I have CS5 now, and need a bit of help. I have a wireless device that I have made, I wish to make a flash program (potentially adapted to iPhone or Android) that sends and receives data (in the form of Word or Byte sized variables) from an IP address assigned to the device. Is this achievable?
    Please help. Thank you

    bump
    Please! anyone! HELP

  • Code beautifier for MXML and ActionScript?

    How do people reformat ugly code in FlexBuilder? I can eaisly
    format my Java, JSP, and XML in the same Eclipse environment, but
    why not MXML and ActionScript? I am very surprised this feature is
    missing. It's quite common that I copy code snippets from somewhere
    to FlexBuilder which are not well formatted.

    Hey guys, Be patient...
    Don't forget the years of Java development that have advanced
    Eclipse, not counting the 40 mil or so in prior development that
    IBM donated when they ported and open sourced their Visual Age
    product line. I used VA it back in 96 and it was slow and clunky,
    and never would have sold against Borland's Java products.
    I'm sure the decision was consciously made by Adobe product
    management to get core feature functionality out and concentrate on
    other stuff for the next release.
    The FLEX team has done a great job and for some who have ever
    been under their delivery schedule for the size of this
    undertaking, many can appreciate how well they have done.
    Also, considering that many eclipse plugins that are free are
    worth what you pay for them (I have tested quite a few), the paltry
    $700 bucks for FLEX and the fact that it has a great debugger and
    profiler makes it worth it.
    One final opinion, no matter what anyone says, software is
    not free. You pay in time, learning curve, more time, and
    sometimes, just plain old tail chasing!
    I'm not really being critical, both of you have valid points,
    just be patient, they'll get there.

  • Newbie questions on fms and actionscript 3

    Ok, like I said I'm a newbie, but I do understand the differance between ssas and as3. Not all, but all most everything I see written in SSAS can be writen into a external AS3 file. This leads me to quite a few questions I'm hoping you kind people can shed some light on for me.
    1)  What is the advantage of writing a SSAS file over an external AS3 file?
    2) Can I write an .asc file in AS3 or do I have to use AS1? Please understand I'm using tuts from fmsguru.com and the books "Learning Flash Media Server" (pdf) and "Programming Flash Communication Server". I'm not a javascript programmer so nothing I do in AS1 seems to make any sence while everything I do in AS3 does. It may not seem like it to you people that are programmers, but to those of us that aren't, AS1 and AS3 are miles apart.
    3) kind of off topic, but a security question. I'm not a "hacker" and don't like the jerks that are. My question is on external AS / SSAS files and swf files. When my fla is compiled into a swf does my external AS files remain external? I assume they do, but then what is the threat of the swf being decompiled? In most projects I would do I could care less if somebody had access to my fla as long as they don't have my actionscript files.
    I don't know. Maybe on questions one and two I'm getting confused becasue I'm using out dated material. Again I assume that even though fms was built off of the javascript engine it should be able to read and execute my AS3 file. Other wise what was the point of the evolution of actionscript into a fully functional programming language?
    Thanks for any help you might have...

    1) I did not get this question correcly - for that matter SSAS can only be in AS1 - so i dont see reason comparing them
    2) It has to be AS1
    3) if you doing "include" stuff - i think code would go into compiled swf and proper decompiler would give you the code.
    Last para - Server-side engine understands only AS1 so it wont be able to read and understand your AS3 file.

  • Is there a simple example, I can see how to connect to a db using Flash 8 and actionscript? (not with components)

    I have been looking all over for a simple "hello world"
    example, on how to connect to a database, and pass a param, and
    return a dataset. I would like one that does not use components.
    (Actionscript only). That uses ColdFusion 7.x and Flash 8. Can
    anyone point me to one?

    Thanks Craig, I saw that example, but it was meant for Flash
    MX, and according to the Flash 8 documentation, the NetServices is
    now deprecated. Anyway, I posted my question on another site and
    some supplied me with a simple example. Here is the url if anyone
    is interested...
    sample

  • Flash CS4 and ActionScript 2.0

    Hello
    Was wondering if you could recommend the publish and save
    settings in Flash CS4 when working with ActionScript 2.0.
    What are my publish settings?
    Flash Player 8 or 9?
    Script: ActionScript 2.0
    Should I be saving the project as CS4 or CS3?
    - I no longer have the ability to save the file as Flash 8 in
    CS4.
    - It looks like I lose my XML files when I save as CS3
    Are there any other settings that need to be changed?
    Thanks in advance
    M

    troika22,
    > Was wondering if you could recommend the publish and
    save
    > settings in Flash CS4 when working with ActionScript
    2.0.
    Ultimately, it depends on what version of Flash Player
    you're aiming
    for.
    > What are my publish settings?
    > Flash Player 8 or 9?
    > Script: ActionScript 2.0
    There are numerous reasons you might decide to code a
    project in AS2.
    You might, for example, not yet have "taken the plunge" to
    AS3, so you may
    not be comfortable with it yet. Your project requirements
    might dictate
    that you support as low as Flash Player 6 (may ad agencies
    have such
    requirements). You might be updating an existing project,
    already built in
    AS2.
    In any of these cases, your publish settings will be
    determined by the
    version of Flash Player you're targetting. Flash Player 8 was
    the first to
    support blend modes and filter effects (drop shadow, etc.),
    so in order to
    support that, you would have to publish to Flash Player 8. If
    you don't
    need those, and if your code itself doesn't rely on features
    that require
    Flash Player 7, you may as well publish to Flash Player 6 and
    reach the
    greatest number of potential viewers. (The farther back you
    go, the more
    likely your viewer will have Flash Player installed, because
    not everyone
    decides to upgrade. That said, most people seem to upgrade.)
    > Should I be saving the project as CS4 or CS3?
    If you're working with a team and some of those people use
    Flash CS3,
    you'll have to save it as CS3 any time you want to share the
    file;
    otherwise, save it as CS4. The FLA settings are independent
    from the SWF
    publish settings.
    > - I no longer have the ability to save the file as Flash
    8 in CS4.
    Correct. Each edition of the IDE only save to the previous
    edition, as
    far as source files go. But each edition of the IDE is
    capable of
    *publishing* as far back as you like.
    > - It looks like I lose my XML files when I save as CS3
    Which XML files are those?
    David Stiller
    Co-author, Foundation Flash CS4 for Designers
    http://tinyurl.com/dpsFoundationFlashCS4
    "Luck is the residue of good design."

  • Flex 4 Migration: skinning, and Actionscript

    Hello,
    I've been researching about this topic, but I wasn't able to find any  examples on "how to skin in flex4" using actionscript. I'm trying to  make a simple test, just load an image inside a container and set the  borderSides properties. This property, and many others, are missing from  flex 4 "by default", now I have to create/define a skin and code it  using Line graphics components, is that correct?
    anyways, my "real" (probably not the smartest but...) I've been struggling around  this problem for a couple days:
       - How do I migrate from Flex 3 (css styles and other stuff) to Flex 4 (skins), BUT I don't want to use mxml files, I'd like to keep everything written in actionscript in my application. It has to be feasible but I couldn't figure out how.
    Thanks in advance
    Renan

    Thanks for the help, we managed to do a skin in actionscript.
    Can you help me with two other issues, I'm still not comfortable with this Flex4 transition:
    Is it possible to load/add an image to a group from the container (in actionscritpt), or you can only do that using skins?
    Can I inherit skins like other classes? For instance: I have a skin to draw borders and another to draw an image, can I extend it to "merge" these two behaviors, border+image.
    Thanks
    renan

  • How to Build a Preloader for Flash CS4 and Actionscript 3.0

    With the wonderful help of many people on this site, I have successfully buit a nice website using Flash CS4.  I am wanting to deploy the site this weekend and I'm working on the finishing touches.  I would like to add a preloader so that the viewer will have everything loaded when the action starts.  Can anyone suggest a good tutorial that shows how to make the simple "rotary lines" that are so popular?  I've seen these and they look to be about an inch across and move like the hands of a clock.  I think it may even say "Loading..." or similar.  Since I'm still learning quite a bit, I did not know if Flash actually offers some "preloaded" tools for stuff like this?  Or am I better off going to Lynda.com and taking a tutorial?  Thanks for the help!

    Dark Armor, You mentioned the book Adobe Flash CS4 Professional Classroom in a Book, which I have.  I could not find anything in there.  Did you mean to say Actionscript 3.0 for Adobe Flash CS4 Professional?  I do have that book and it looks like there is information there.  Just wanting to make sure that you meant what you said.  Thanks!

  • Using web services with flash cs3 and actionscript 3.0

    Hi,
    I want to use web services under flash cs 3 and by using as
    3.0.
    It was possible with as 2.0 to do it easily thanks to the
    webservice Connector.
    But I can't find how to use web services under flash and as
    3.0.
    I thought web services took part of the many improvements
    flash cs 3.0 contain, but obviously it does not:(
    Can anybody help me to use webservices with flash cs 3 and as
    3.0?
    Thanks in advance,
    Pascal

    Dark Armor, You mentioned the book Adobe Flash CS4 Professional Classroom in a Book, which I have.  I could not find anything in there.  Did you mean to say Actionscript 3.0 for Adobe Flash CS4 Professional?  I do have that book and it looks like there is information there.  Just wanting to make sure that you meant what you said.  Thanks!

  • The future of Flash and Actionscript 3.0, need your advise

    Hello friends, currently I'm learning Actionscript 3.0, but have been reading a lot about Adobe disscontinuing Flash in the near future in support of HTML 5. Now, what I want to know is this: should I continue my education in AS3.0, or am I wasting my time?
    If I am wasting my time, what language should I learn that will give me the ability to make robust websites? Java???
    And is the "Flash" program gonna be completely obsolete? I'm somewhat confused on this subject and want to work effeciently.
    Please, need advise from someone who really knows, so that I can continue my education in the right path.
    Recommendations to links, books, videos would be greatly appreciated that you might think can help me in this matter.
    Thank you friends:)

    You should list all of the sources you're indicating you have been reading so that anyone can have a better idea of the potential validity of what you say you are reading.
    As far as AS3 goes, you should continue your studies... there is a future despite the fact that AS3 will probably be replaced with AS4 and on as time go by.  And if web design is in your future you should follow on with learning all you can relevant to html5/javascript/css so that you have the skills needed for those as well.
    Here's s link to something from the folks who know better than anyone that might help you get a flavor of the plans with respect to Flash/AS3+...
    http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html

  • RoboHelp 9 and ActionScript?

    Hello. I am still quite green when it comes to the in's and out's of RoboHelp, so please pardon me if my inquiry is out-of-place in any way...
    I am working on a PC/Mac compatible AIRHelp project in RoboHelp 9, and was wondering if there are any issues with authoring/inserting Actionscript? Essentially what I am looking to do is add two ActionScript source code files... the first is to be added to the project source folder and defines a particular class...  the second attempts to validate a function of said class. As these source files are part of a third party purchase, I wanted to verify that this class can be interfaced once the installed .air application is launched.
    I thank you in advance for your time and information

    Yes. It's called Technical Communication Suite upgrade
    Sorry to be flippant. The whole point of TCS is that it adds the level of integration that you require but which is not available in the individual products.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • Buttons and ActionScript Code

    Hi everyone just signed up to this forum today, really need help, would appreciate your help.
    Basically I have created 5 buttons on one single layer. I am now trying to link each button to a website, but to no success as of yet.
    I realised that maybe in order to make it easier for myself I need to put each button in its own layer and insert the following actionscript code I've inserted for one of my buttons:
    stop()
    home_btn.addEventListener(MouseEvent.CLICK, mouseClick);
    function mouseClick(event:MouseEvent):void
    var request = new URLRequest("http://www.sign-technologies.net/");
    navigateToURL(request,"_blank");
    This code links my first button "home_btn" to my site, which is still underconstruction. When I run it in flash it works, but when I click the button in the actual web browser it will not go to the webpage, so I'm stuck.
    Another question: For convience sake is there a way I can have all the buttons in one layer, but insert code that can seperate one button from the other? Anyone have that code?

    You can place all of your buttons in one layer and all of your code preferably in another layer.  What you will need to do is have differently named functions for each button.  You can not name them all "mouseClick"... I'll suggest you name the function in relation to the button, as in....
    home_btn.addEventListener(MouseEvent.CLICK, homeClick);
    function homeClick(event:MouseEvent):void
         var request = new URLRequest("http://www.sign-technologies.net/");
         navigateToURL(request,"_blank");
    As far as the file not working when testing in a browser, it should.  There is nothing wrong with the code.
    There are other ways of coding where you can have the same function shared by all the buttons, but that might be a better lesson for another day.

  • Interactivity and Actionscript 3

    I encounter difficulties with actionscript 3 and I don't know
    what happen.
    Can you check and help me ?
    the website is www.challengeecricome.fr
    Thanks for all.

    stop();
    bcamera_btn.addEventListener(MouseEvent.CLICK, camera);
    function camera(pEvt:Event):void
    var tv:URLRequest = new URLRequest( "
    http://www.challengeecricome.fr/tv.php"
    navigateToURL ( tv );
    bfacebook_btn.addEventListener(MouseEvent.CLICK, bfacebook);
    function bfacebook(pEvt:Event):void
    var facebook:URLRequest = new URLRequest( "
    http://www.facebook.com/home.php#/event.php?eid=28546354142&ref=ts"
    navigateToURL ( facebook );
    bcontact_btn.addEventListener(MouseEvent.CLICK, contact);
    function contact(event :MouseEvent) : void {
    gotoAndStop("label1");
    bphone_btn.addEventListener(MouseEvent.CLICK, phone);
    function phone(event :MouseEvent) : void {
    gotoAndStop("label2");
    bmouette_btn.addEventListener(MouseEvent.CLICK, mouette);
    function mouette(event :MouseEvent) : void {
    gotoAndStop("label3");
    bconcept_btn.addEventListener(MouseEvent.CLICK, concept);
    function concept(event :MouseEvent) : void {
    gotoAndStop("label4");
    becricome_btn.addEventListener(MouseEvent.CLICK, ecricome);
    function ecricome(event :MouseEvent) : void {
    gotoAndStop("label5");
    bfootball_btn.addEventListener(MouseEvent.CLICK, football);
    function football(event :MouseEvent) : void {
    gotoAndStop("label9");
    brugby_btn.addEventListener(MouseEvent.CLICK, rugby);
    function rugby(event :MouseEvent) : void {
    gotoAndStop("label10");
    bbasket_btn.addEventListener(MouseEvent.CLICK, basket);
    function basket(event :MouseEvent) : void {
    gotoAndStop("label11");
    bhandball_btn.addEventListener(MouseEvent.CLICK, handball);
    function handball(event :MouseEvent) : void {
    gotoAndStop("label12");
    bvolleyball_btn.addEventListener(MouseEvent.CLICK,
    volleyball);
    function volleyball(event :MouseEvent) : void {
    gotoAndStop("label13");
    btennis_btn.addEventListener(MouseEvent.CLICK, tennis);
    function tennis(event :MouseEvent) : void {
    gotoAndStop("label14");
    bplace_btn.addEventListener(MouseEvent.CLICK, place);
    function place(event :MouseEvent) : void {
    gotoAndStop("label16");
    bpartenaires_btn.addEventListener(MouseEvent.CLICK,
    partenaires);
    function partenaires(event :MouseEvent) : void {
    gotoAndStop("label19");
    bhome_btn.addEventListener(MouseEvent.CLICK, home);
    function home(event :MouseEvent) : void {
    gotoAndStop(2);
    bchallenge_btn.addEventListener(MouseEvent.CLICK, challenge);
    function challenge(event :MouseEvent) : void {
    gotoAndStop("label4");
    bsports_btn.addEventListener(MouseEvent.CLICK, sports);
    function sports(event :MouseEvent) : void {
    gotoAndStop("label8");
    bplace2_btn.addEventListener(MouseEvent.CLICK, place2);
    function place2(event :MouseEvent) : void {
    gotoAndStop("label16");
    bpartenaires2_btn.addEventListener(MouseEvent.CLICK,
    partenaires2);
    function partenaires2(event :MouseEvent) : void {
    gotoAndStop("label19");
    }

  • WebService and ActionScript class

    Hi,
    I am trying to create an actionscript class to use it in my
    mxml component.
    I have the floowing code which works perfectly.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application creationComplete="HTTPdecision.send()"
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="870">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    import com.sourcepulse.com.dtRulesClass;
    private var endURI:XML;
    private var URI:XMLList;
    private function setURI(event:ResultEvent):void
    endURI = event.result as XML;
    URI = new XMLList(endURI.endpoint.webservice.location);
    Test.endpointURI= URI.toString();
    ]]>
    </mx:Script>
    <mx:HTTPService id="HTTPdecision"
    url="../XML/endpointURI.xml" resultFormat="e4x"
    result="setURI(event)" />
    <mx:WebService service="amazon" port="amazonSOAP"
    id="Test"
    wsdl="
    http://localhost:9081/ezbuyer/amazon/services/amazonSOAP/wsdl/amazon.wsdl"
    >
    <mx:operation name="getISBNDetails">
    <mx:request xmlns="">
    <isbnSearchRequest>
    <bookName>{txtBookName.text}</bookName>
    <category>{txtCategory.text}</category>
    </isbnSearchRequest>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:Panel x="100" y="100" width="600" height="500"
    layout="absolute"
    title="Amazon WebService">
    <mx:VBox height="400">
    <mx:VBox>
    <mx:Form width="400" height="145" autoLayout="true">
    <mx:FormHeading label="Specify the following:"/>
    <mx:FormItem width="307" label="BookName :">
    <mx:TextInput id="txtBookName"/>
    </mx:FormItem>
    <mx:FormItem width="308" label="Category :">
    <mx:TextInput id="txtCategory" />
    </mx:FormItem>
    <mx:FormItem width="312">
    <mx:Button label="Test"
    click="Test.getISBNDetails.send()"/>
    </mx:FormItem>
    </mx:Form>
    </mx:VBox>
    <mx:VBox>
    <mx:Form width="400" height="122" autoLayout="true">
    <mx:FormHeading label="Book Details:"/>
    <mx:FormItem width="307" label="ISBN :">
    <mx:Text text="{Test.getISBNDetails.lastResult.isbn}"
    />
    </mx:FormItem>
    <mx:FormItem width="308" label="Author :">
    <mx:Text text="{Test.getISBNDetails.lastResult.author}"
    />
    </mx:FormItem>
    </mx:Form>
    </mx:VBox>
    </mx:VBox>
    </mx:Panel>
    </mx:Application>
    Now instead of binding the input from the textboxes directly
    as in the above code
    <mx:request xmlns="">
    <isbnSearchRequest>
    <bookName>{txtBookName.text}</bookName>
    <category>{txtCategory.text}</category>
    </isbnSearchRequest>
    </mx:request>
    I created an actionscript class
    package com.xxxx.com
    public class simpleTest
    //Instance Variables
    private var bookName:String;
    private var category:String;
    public function simpleTest()
    function getBookName():String {
    return bookName;
    function setBookName(bookName:String):Void {
    this.bookName = bookName;
    function getCategory():String {
    return category;
    function setCategory(category:String):Void {
    this.category = category;
    How can I use this ActionScript class to use in
    <bookName>{txtBookName.text}</bookName>.
    Thanks in advance.

    I think you're close to achieving what you want... first I
    would change your getter and setter methods just a bit to make them
    properties. Second add the [Bindable] meta tag in front of one of
    each of the group of properties (i.e. you don't need it in front of
    both the get and set method, just one of them).
    i.e.
    [Bindable]
    public function get category():String {
    return category;
    public function set category(value:String):void{
    category = value;
    then in your mxml you can "bind" to each property you've
    defined in the class. so if you create a new instance of your
    simpleTest class called "test" you could do the following:
    <mx:Label text="{test.category}" />

Maybe you are looking for

  • No video in Viewer/Canvas, only audio

    I use Final Cut Pro X since Day One and I survived bugs and endless beachballs on my 2011 17' Macbook Pro. A week ago FCPX stopped playing any video in viewer/canvas while scrubbing. Only audio is audible. Impossible previewing a single clip or playi

  • Here's a layout puzzle looking for a good solution

    Does anyone have ideas what the best way to do this might be? I am writing a long book text (several hundred pages) which should be in a single continuous column. I want to have occasional brief notes placed outside the text and alongside, in the mar

  • BSI Message - 4101 Can not process duplicate resident state FED

    Dear experts, I'm facing this issue when I run payroll. Its happening with all tax authorities. PCL of WTs are same and have not been touched.  There is no duplicate records in IT0207 and IT0208. When I look at 'Tax Data' in payroll log under USTAX->

  • Lync Server 2013 Standard Deployment: Cannot Open Service Control Manager...

    Hi thanks for any advice.I've just install Lync 2013 Standard as the steps in Technet,When I publish the topology,meet the error as listed. ****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.XdsDatabase'****  Initializing DbSetupBase  Parsin

  • Ram all used, system sluggish, nothing open

    So it started after I upgraded to Leopard (clean install) and after my machine has been running for over a day or two, usually after using something flash intensive in safari but not always, Ill come back to my computer in the morning and my wired ra