Amfphp and tcpdf

Hi,
I'd like to generate a pdf from within my amfphp service. Anyone know how to do this?
simplified code:
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->output('doc.pdf', 'I');
This last line of code should open a new browser window and display the pdf
Any idea?
Dany

More details on the error:
code:
Client.Error.MessageSend
Message:
Send failed
Detail:
Channel.Connect.Failed error NetConnection.Call.BadVersion: :
url: '
http://localhost/amfphp/gateway.php'

Similar Messages

  • AMFPHP and AS3FLEXDB - how to disable 'busy indicator' during query execution ?

    I'm doing some experiments with Flex and SQL with use of as3flexdb and AMFPHP.
    I've written some application which is pushing some data to SQL base...
    problem is, that durring query execution, there is some 'busy indicator' on the screen
    - some circle, and word 'loading'.
    Have you any idea how to disable this ?
    Everything what I'm doing is based on this tutorial below, but there is no idea in it how to
    disable the indicator.
    http://ghalex.com/blog/tag/as3flexdb
    I'm not sure if this indicator comes from as3flexdb libraries or AMFPHP itself ?
    Has anyone of you had such problem before ??
    Thanks for all ideas
    Rymas,

    Unfortunatelly my cheers was to early
    I've successfully decompiled the library swc file, found Query.as class and corrected things mentioned in this
    post : http://itutorials.ro/viewtopic.php?f=9&t=22&p=59&hilit=loading#p59
    ... but I cannot compile the library.fla back to swf ... it's generating some errors
    Could anyone help me with that, maybe you've got more expirience with decompiling and compiling.
    Orginal .swc file is here : http://www.rymasek.iq.pl/swc/as3flexdb_1.3.0.swc
    Thanks for help !!

  • AMFPHP and Flex 2 B3

    I'm trying to do the AMFPHP tutorial in the Labs wiki and am
    running into errors. Any ideas what is happening?
    Here's the tutorial
    Link
    to Wiki
    I'm getting an error on this line:
    public var gateway : RemotingConnection;
    And the error is: Type was not found or was not a
    compile-time constant: RemotingConnection.
    Anyone done this in Beta 3 and had success? How?

    I'm trying to do the AMFPHP tutorial in the Labs wiki and am
    running into errors. Any ideas what is happening?
    Here's the tutorial
    Link
    to Wiki
    I'm getting an error on this line:
    public var gateway : RemotingConnection;
    And the error is: Type was not found or was not a
    compile-time constant: RemotingConnection.
    Anyone done this in Beta 3 and had success? How?

  • AMFPHP and Site

    Way of knowing if this site www.carmotors.com.br uses AMFPHP?

    Hey Sky,
    I am personally using AMFPHP. It is a little outdated but for small to medium sized project I found out that it works very well. Also AMF is a little smaller and is faster in some cases.
    Now Zend is much more robust and also updated and current. I have it installed as well and I think I might migrate my stuff eventually.
    So I would go with Zend if you have to start from scratch. I you are already using AMF then I don't think it's worth the effort on migrating unless you're working on some large scale project.
    But then that's just my personal opinion.

  • AMFPHP and Email

    Hello all,
    Firstly is it possible to use AMFPHP to send emails ?
    At the moment i am using the following PHP script to send emails
    <?php
    $to = $_POST['senderemail'];
    $fname = $_POST['firstname'];
    $sname = $_POST['secondname'];
    $pass = $_POST['password'];
    $recipient = "$to";
    $headers = "From: [email protected] ";
    $subject = "Elizabeth Norman International Video Recruiter";
    $body = "Dear $fname $sname, \n You have now been registered in the Elizabeth Norman International Video Recruiter system. \n Your username is: $to \n Your password is: $pass \n A consultant will be in touch soon. \n \n";
    mail($recipient, $subject, $body, $headers)
    ?>
    This is a standalone php file on my server.  I would like to intergrate this into my AMFPHP services script file (the file that contains about 15 functions)
    Is it at all possible ?  If so could someone help ?

    Thanks for the reply.  Although i dont think i explained myself clearly.
    I have a AMFPHP service file, that is as follows
    <?php
    class jobs
    var $db_host = '';
    var $db_name = '';
    var $db_user = '';
    var $db_pwd = '';
    function jobs()
    $this->methodTable = array(
    "getJobs" => array(
    "description" => "Info Database",
    "access" => "remote"
    function getAllJobs()
    $mysql = mysql_connect($this->db_host, $this->db_user, $this->db_pwd);
    mysql_select_db( $this->db_name);
    $Query = "SELECT * from usernames WHERE level = 'clientuser'";
    $Result = mysql_query( $Query );
    return( $Result );
    function getLinks()
    $mysql = mysql_connect($this->db_host, $this->db_user, $this->db_pwd);
    mysql_select_db( $this->db_name);
    $Query = "SELECT * from link";
    $Result = mysql_query( $Query );
    return( $Result );
    ?>
    How would i go about adding this script to that set of functions
    <?php
    $to = $_POST['senderemail'];
    $fname = $_POST['firstname'];
    $sname = $_POST['secondname'];
    $pass = $_POST['password'];
    $recipient = "$to";
    $headers = "From: [email protected] ";
    $subject = "Elizabeth Norman International Video Recruiter";
    $body = "Dear $fname $sname, \n You have now been registered in the Elizabeth Norman International Video Recruiter system. \n Your username is: $to \n Your password is: $pass \n A consultant will be in touch soon. \n \n";
    mail($recipient, $subject, $body, $headers)
    ?>
    I have tried a few different things, but when i then upload the changed version, it corrupts the file so to speak and none of the functions work.
    Do you know how i could implement it ?
    Thanks

  • AMFPHP and dial up.

    When I have tested the movie it works but when i simulate
    download i won't work. I have a preloader that loads first as the
    classes are loaded in the second frame of the .swf file. In the
    simulation i have the download settings to dial up speed (56K). The
    preloader comes in but starts at 13% which is annoying as i want it
    to start at 0% then it finishes and goes straight to the message
    box whixh uses the amfphp. It just says "please wait..." And
    nothing happens. What is suppose to happen is the messages stored
    on the server is then loaded up. I used netDebugger and showed in
    the flash side that it was calling the php but not connection and
    the php is not responding.
    I am wooried by this and only discovered it when i was
    surfing the internet on my psp and that the flash file loaded but
    it just stopped at "please wait..." just like in the simulation. I
    believe they are connected. And if anyone is wondering my psp
    version is 2.80. Which at the time of writing this is up to date
    and is flash enabled.

    We do our development using a local apache server, and
    everything works fine in the IDE unless we do the simulated
    download. For whatever reason, it just doesn't work, so I wouldn't
    worry too much about it. If you really want to see what everything
    looks like put together, go look at it on a slow connection. As for
    your 0% problem, my guess is that your preloader and any
    classes/library items exported on the first frame represent 13% of
    your total file size, so there's not a lot you can do about that
    other than faking it.
    As for your PSP issue, I can't help you there.

  • Amfphp and datefield

    hello,
    i've got some issues using amfphp with a datefield
    there is a timestamp field in the database and i retrieve it
    as a string
    i'd want to use a datefield to change and select a new date
    to make an insert or update in the database
    i suppose i had to convert the string into date but this is
    not working (i've tried with datefield.stringToDate)
    and to convert the date again in string to do the insert,
    update but i don't know how
    any help or piece of advice is more than welcome
    thanks for reading

    More details on the error:
    code:
    Client.Error.MessageSend
    Message:
    Send failed
    Detail:
    Channel.Connect.Failed error NetConnection.Call.BadVersion: :
    url: '
    http://localhost/amfphp/gateway.php'

  • Amfphp and flex - parsing a struct

    I am using an amfphp service, which I call from Flex. The
    service is embedded in a drupal site, and it calls a function named
    getTree() which returns a php "struct"
    I can pull out vars from the struct and show them in a
    DataGrid (in columns), but since I don't know how deep the struct's
    hierarchy is, what I really need is a way to iterate through it and
    load all the items into something I can deal with (an
    ArrayCollection???)
    1. what should I use to store the data (ArrayCollection,
    Array, etc.) and why?
    2. what code will repeatedly iterate through a tree hierarchy
    until it finds all items?
    much thx,
    -p

    "LuigiL" <[email protected]> wrote in
    message
    news:[email protected]...
    > That would depend an the struct that is returned. I'm
    getting arrays
    > returned
    > containing objects, see attached dump from
    > trace(ObjectUtil.toString(event.result)); in a result
    handler on the
    > RemoteObject.
    >
    > I'm parsing the result into an Array and somewhere else
    in the program I
    > use
    > this array to create an ArrayCollection to serve as a
    dataprovider for a
    > list.
    >
    >
    > private function
    onCategoriesResult(event:ResultEvent):void
    > {
    > trace(ObjectUtil.toString(event.result));
    >
    > if(event.result.length > 0) {
    > for(var i:uint = 0; i < event.result.length; i++) {
    > var category:Category = new Category(event.result
    .product_category_id,
    > event.result.name);
    > _categories.push(category);
    > }
    > broadcastCategoriesLoaded();
    > }
    > }
    >
    > private function broadcastCategoriesLoaded():void
    > {
    > dispatchEvent(new
    Event(RemotingCall.CATEGORY_DATA_LOADED));
    > }
    That's not really recursive. I didn't have time to go into my
    code and look
    anything up earlier this morning, but here's some code that
    recurses XML and
    parses it into custom VO's, MenuContainers. Each
    MenuContainer has a
    children collection that can contain Task VO's (technically
    TaskUID's which
    are Task VO's decorated with IUID) or other MenuContainers:
    private function parseTaskXML(taskXML:XML):void{
    //recursively loads a menu container with task VO's
    //this also loads the singleton TaskManager for use
    //across the app
    _allTasks=getChildrenFromXML(taskXML.children());
    private function
    getChildrenFromXML(childXML:XMLList):ArrayCollection{
    var childObj:*;
    var dateStr:String;
    var theDate:Date;
    var splitDateStr:Array;
    var tmpID:int;
    var tmpDesc:String;
    var tmpRunMode:String
    var resultAC:ArrayCollection = new ArrayCollection();
    for each (var child:XML in childXML){
    switch (child.name().toString()){
    case 'task':
    //parse date info into a true date
    if (child.child('taskDate').length()>0){
    //temporary string with the date in it in the
    //format mm/dd/yyyy
    dateStr=child.child('taskDate')[0].text();
    splitDateStr=dateStr.split('/');
    theDate = new Date(splitDateStr[2], int(splitDateStr[0]) -
    1,
    splitDateStr[1]);
    } else {
    theDate = null;
    /* If the task has its own runmode, use that.
    Otherwise, use the container run mode */
    if (child.child('runMode').length()>0){
    tmpRunMode=child.child('runMode')[0].text();
    } else {
    tmpRunMode = child.parent().attribute('runMode');
    //Alert.show(child.toXMLString(),
    int(child.levelID[0]).toString());
    childObj = new Task(int(child.@id), child.idString,
    int(child.levelID[0]),
    child.desc,
    Task.isCompleteStringToConst(child.isComplete),
    child.isActive == 'true' ? true : false, theDate,
    child.isBookmarked == 'true' ? true : false,
    tmpRunMode);
    taskManager.tasks.addItem(childObj);
    //decorate with IUID to allow easier indexing in
    HierarchicalData
    childObj = new TaskUID(childObj);
    break;
    case 'container':
    childObj = new MenuContainer(int(child.@id), child.@desc,
    child.@runMode);
    //continue recursing until all container children have been
    accounted
    for
    if (child.children().length()>0){
    childObj.children=getChildrenFromXML(child.children());
    break;
    default:
    //default object
    tmpID=0;
    if (child.attribute('id').length()>0){
    tmpID = int(child.@id)
    } else if (child.child('id')){
    tmpID = int(child.id);
    if (child.attribute('desc').length()>0){
    tmpDesc = child.@desc
    } else if (child.child('desc')){
    tmpDesc = child.desc;
    childObj = new Object();
    childObj.id=tmpID;
    childObj.desc = tmpDesc;
    break;
    resultAC.addItem(childObj);
    return resultAC;
    I can't write recursive code off the top of my head--I find
    it takes me a
    while to get me into the mental state where it makes any
    sense at all.
    That's why I had to look it up :-).
    HTH;
    Amy

  • AMFPHP and remoting components

    I am attempting to get AMFPHP going and have just installed
    the latest remoting components.I get these errors when running any
    samples I have found.
    **Error** NetServices.as: Line 24: Error opening include file
    RemotingComponentVersion.as: File not found.
    #include "RemotingComponentVersion.as"
    **Error** NetServices.as: Line 24: Error opening include file
    RemotingComponentVersion.as: File not found.
    #include "RemotingComponentVersion.as"
    Anybody experience this and or can offer a solution?

    did you drag and drop the remoting component classes from
    "Window ->
    Common Libraries -> Remoting" into your library?
    perry

  • Send and load

    i have checked google and found horrible incomplete examples
    in using send and load XML with php. I have spent an hours on this
    and nothing. Unless i can get ha;f decent example with this i think
    I might confine XML to the dustbin. This has been horrible
    understanding this stuff.
    I can use loadvars ut i here XML is better for larger data.
    I have got this with load and send and send and load.
    I just want to send xml data and then use php script to look
    at it (load to mysql)and then send it all back. That doesnt sound
    hard but it is by the look of it IS.

    Hi there,
    I use AMFPHP and it works fine for me to retrieve data from a
    database with php and send it to flash and vice versa.
    The sad thing is that i just began doing this so i don't know
    much about it yet.
    Maybe it helps you to.
    Greetz jacob
    ps. if you intend to use amfphp pleas post all links to
    tutorials about this here so we all can learn more about
    amfphp.

  • Amfphp - flex remote object error event handler

    I'm using amfphp and I want it to return an error that the flex remote object error event handler will pick up. At the moment I can get only the result handler to do anything in flex.

    Hi,
    Try throwing an exception in the remote method. For example,
    function inverse($x) {
        if (!$x) {
            throw new Exception('Division by zero.');
        else return 1/$x;

  • Putting a multidimensional array (from amfphp) into list dataprovider via actionscript not working

    when i do it using mxml, the list populates but when i try
    doing it using actionscript 3 it is not working.
    //DOESNT WORK...
    var catList:List = new List;
    catList.dataProvider = multiDArr;
    catList.labelField = 'label';
    this.addChild(catList);
    //WORKS...
    var catList:List = new List;
    catList.dataProvider = singleDArr;
    catList.labelField = 'label';
    this.addChild(catList);
    //WORKS...
    <mx:List dataProvider="{multiDArr}" />
    // here is the array i am passing from amfphp and putting
    into multiDArr ...
    $arr[$i]['label'] = mysql_result($result,$i,'feature_name');
    $arr[$i]['_type'] = mysql_result($result,$i,'feature_type');
    $arr[$i]['_value'] =
    mysql_result($result,$i,'feature_value');

    well i got a solution to my problem...for now!

  • Can AMFPHP (for our testing) easily be swapped with BlazeDS (later on in production)?

    Hello,
    I was wondering if it is possible to create a Flex application and use AMFPHP for testing purposes; and then easily swap this implementation with BlazeDS before going into production?
    Or to put it in another way: It seems AMFPHP and BlazeDS work via a different connection strategies; NetConnection and mx:HTTPService... can't I access both services providers in a uniform way?
    Thanks a lot in advance and have a nice day! :)

    Hi. You should be able to use the NetConnection ActionScript API in your Flex app to call a RemoteObject in BlazeDS. I think this is handled by the flex.messaging.endpoints.amf.LegacyFilter class in BlazeDS. Normally you would use the mx:RemoteObject tag or the RemoteObject ActionScript API but calling a RemoteObject using NetConnection should be supported.
    I thought I saw that AMFPHP supports using a Flex client with the RemoteObject API so maybe you should use RemoteObject for testing and production and not NetConnection.
    Hope that helps.
    -Alex     

  • AMFPHP 5.0Mb data timeout error

    Hi,
    im using amfphp and have 5Mb data, in 500 rows.
    But im receiveing timeout error.
    I have some 500Kb on datagrid and the rest on RichTextEditor.
    What can i do to receive this without error? Is it possible to call the some function a lot of times and populating the datagrid in 10 rows each time, for example?
    Thanks for help.

    The parameter log_archive_config is wrongly configured on the standby database.
    Add the database unique name (db_unique_name) of the primary database to the log_archive_config of the standby database
    On the standby, your log_archive_config should be something like
    log_archive_config='DG_CONFIG=(icts001,sms)';
    cmadiam82     
    Handle:  cmadiam82   
    Status Level:  Newbie 
    Registered:  Feb 28, 2010 
    Total Posts:  36 
    Total Questions:  13 (11 unresolved)  It is sad to see that forums is of no help to you. :(
    Please mark the threads as answered if you have got a solution and keep the forums clean. If not, then reply to your questions so that you would get back an answer rather than keeping it as unanswered.

  • AMFphp

    Ok, I'm very new to AMFphp and am trying to use it to pass
    variables from the flashcomm server to the php class. I can recieve
    the results from the class just fine, but none of the variables I
    pass to it come back when I have the php class send them back.
    here is the php class
    <?php
    class Presenter
    function Presenter()
    $this->methodTable = array
    "say" => array
    "access" => "remote",
    "description" => "Pings back a message"
    function say($data)
    return $data;
    ?>
    This is the main.asc file I am using
    load("netservices.asc");
    application.onAppStart = function(){
    trace("Application has started " + application.name);
    NetServices.setDefaultGatewayUrl("
    http://localhost/flashservices/gateway.php");
    var gatewayconn = NetServices.createGatewayConnection();
    this.service = gatewayconn.getService("Presenter",this)
    application.onConnect = function(client,ID){
    this.acceptConnection(client);
    trace("Sending remote Message");
    this.service.say("Hello Moto");
    this.say_Result = function(result){
    trace("AMFphp sent back: " + result);
    application.onAppStop = function(){
    trace("The application has closed");
    Now what I cannot figure out is why it doesn't pass back the
    variables if it is even recieving them.

    Hi
    I am kind of new to flex, too, but here is how I would do it.
    First you get your php code to turn the query resulta in xml
    data, turning everything into nodes. You have several examples on
    the web that tells you how to do this.
    Then, in Flex, you use Datagrid, for one, to get the data
    from the php file as you would do with a regular xml file (using
    httpservice). then you choose the nodes you want to use and the
    data on each record to display in each column of the datagrid.
    I hope this helped.

Maybe you are looking for

  • Socket threads problem after SOA installation

    Hi all, I am getting below error after sending request to the server(after weblogic and SOA servers started properly. <Warning><Socket>'There are: '5' active sockets, but the maximum number of socket readers allowed by the configuration is: '4', you

  • Aspect Ratio in iTunes different than Qt and FrontRow

    On my fully updated G5 with 10.5.1, I have some tv shows which display correctly in Quicktime and FrontRow but the aspect ratio is all wrong when playing in iTunes. The shows are NTSC recorded off the air on a Tivo and trancoded (and deinterlaced) to

  • *** Can I password-protect my iBlog?

    I know I can put passwords on individual sites, but can I do it on my blog? I'm publishing the blog to my .mac account... Thanks in advance!

  • Viewing Photoshop Brushes .abr

    Hi. Is there a way to view brushes in Bridge. I have looked at Brush Pilot for Mac and ABRviewer and no success on my MacPro running 10.5.7 I am trying to create a catalogu of all my Photoshop brushes. Thanks Stephen

  • Deploy Oc4j: NoClassDefFoundError: oracle/jbo/JboException

    Hi! I'm pretty new developer with JDeveloper. I got an error when I try to deploy my application. I was looking over my blog,but I couldn't find solution. Please help me. This is my deploy log message. Deployment failed Elapsed time for deployment: 2