How to print text/data in flex 3 using printer???Plz help...

   Hi,
          plz tell me the way to print text/data using printer in flex.  I tried the FlexPrintJob class. but it takes object of a container to be printed & prints the visible content of that container(along with scrollbars), bt i want to print all contents of the container(including invisible).
      I have tried to print bitmap image through FlexPrintJob but it takes lot of time for spooling... So plz help me out in printing(fast with all content) in flash
I am using flex 3 (flex Builder 3 IDE).
  Thanks in advance!!!

Hi Sagar,
Don't worry You can use the below work around to print all the contents of the Container including the invisible contents under scrolll with out scroll bar..
So what the idea here is we are seeting the container height to full size with out scrolls before sending the container object to printer and as soon as you print the object you are restoring it to the original height with scrolls...so that you can print the full contents without scrolls...
You may have doubt that by chnaging and restoring the size the user may see momentary resize of the container but it is not so as it is a fraction of a second and user cannot notice this change... Give it a try ..I had already run into this problem recently and I have found a work around for this which is as below:
// Here mainContainer is the container or box id the contents of which you want to print
   private function doPrintContainer():void
    var printJob:FlexPrintJob = new FlexPrintJob();
    if(printJob.start() != true) return;
    try
     var mainContainerHeight:int = mainContainer.height;
     //Increasing the height of the desired component to be printed.
     mainContainer.height = mainContainer.measuredMinHeight;
     mainContainer.verticalScrollPolicy = "off";
     //Adding the resized Component to our FlexPrintjob and then sending the print request
     printJob.addObject(this,FlexPrintJobScaleType.MATCH_WIDTH);    
     printJob.send();
     //Resizing the component back to normal size
     mainContainer.height = mainContainerHeight;
     mainContainer.verticalScrollPolicy = "auto";    
    catch(error:Error)
                 trace("Error : " + error.message);
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari

Similar Messages

  • How to import csv data into Oracle using c#

    Hello,
    How to import csv data into Oracle using c #. Where data to be imported 3GB in size and number of rows 7512263. I've managed to import csv data into Oracle, but the time it takes about 1 hour. How to speed up the time it takes to import csv data into oracle. Thank you.
    This is my code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    using System.Threading;
    using System.Text.RegularExpressions;
    using System.IO;
    using FileHelpers;
    using System.Data.OracleClient;
    namespace sqlloader
    class Program
    static void Main(string[] args)
    int jum;
    int i;
    bool isFirstLine = false;
    FileHelperEngine engine = new FileHelperEngine(typeof(XL_XDR));
    //Connect To Database
    string constr = "Data Source=(DESCRIPTION=(ADDRESS_LIST="
    + "(ADDRESS=(PROTOCOL=TCP)(HOST= pt-9a84825594af )(PORT=1521 )))"
    + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=o11g)));"
    + "User Id=xl;Password=rahasia;";
    OracleConnection con = new OracleConnection(constr);
    con.Open();
    // To Read Use:
    XL_XDR[] res = engine.ReadFile("DataOut.csv") as XL_XDR[];
    jum = CountLinesInFile("DataOut.csv");
    FileInfo f2 = new FileInfo("DataOut.csv");
    long s2 = f2.Length;
    int jmlRecord = jum - 1;
    for (i = 0; i < jum; i++)
    ShowPercentProgress("Processing...", i, jum);
    Thread.Sleep(100);
    if (isFirstLine == false)
    isFirstLine = true;
    else
    string sql = "INSERT INTO XL_XDR (XDR_ID, XDR_TYPE, SESSION_START_TIME, SESSION_END_TIME, SESSION_LAST_UPDATE_TIME, " +
    "SESSION_FLAG, VERSION, CONNECTION_ROW_COUNT, ERROR_CODE, METHOD, HOST_LEN, HOST, URL_LEN, URL, CONNECTION_START_TIME, " +
    "CONNECTION_LAST_UPDATE_TIME, CONNECTION_FLAG, CONNECTION_ID, TOTAL_EVENT_COUNT, TUNNEL_PAIR_ID, RESPONSIVENESS_TYPE, " +
    "CLIENT_PORT, PAYLOAD_TYPE, VIRTUAL_TYPE, VID_CLIENT, VID_SERVER, CLIENT_ADDR, SERVER_ADDR, CLIENT_TUNNEL_ADDR, " +
    "SERVER_TUNNEL_ADDR, ERROR_CODE_2, IPID, C2S_PKTS, C2S_OCTETS, S2C_PKTS, S2C_OCTETS, NUM_SUCC_TRANS, CONNECT_TIME, " +
    "TOTAL_RESP, TIMEOUTS, RETRIES, RAI, TCP_SYNS, TCP_SYN_ACKS, TCP_SYN_RESETS, TCP_SYN_FINS, EVENT_TYPE, FLAGS, TIME_STAMP, " +
    "EVENT_ID, EVENT_CODE) VALUES (" +
    "'" + res.XDR_ID + "', '" + res[i].XDR_TYPE + "', '" + res[i].SESSION_START_TIME + "', '" + res[i].SESSION_END_TIME + "', " +
    "'" + res[i].SESSION_LAST_UPDATE_TIME + "', '" + res[i].SESSION_FLAG + "', '" + res[i].VERSION + "', '" + res[i].CONNECTION_ROW_COUNT + "', " +
    "'" + res[i].ERROR_CODE + "', '" + res[i].METHOD + "', '" + res[i].HOST_LEN + "', '" + res[i].HOST + "', " +
    "'" + res[i].URL_LEN + "', '" + res[i].URL + "', '" + res[i].CONNECTION_START_TIME + "', '" + res[i].CONNECTION_LAST_UPDATE_TIME + "', " +
    "'" + res[i].CONNECTION_FLAG + "', '" + res[i].CONNECTION_ID + "', '" + res[i].TOTAL_EVENT_COUNT + "', '" + res[i].TUNNEL_PAIR_ID + "', " +
    "'" + res[i].RESPONSIVENESS_TYPE + "', '" + res[i].CLIENT_PORT + "', '" + res[i].PAYLOAD_TYPE + "', '" + res[i].VIRTUAL_TYPE + "', " +
    "'" + res[i].VID_CLIENT + "', '" + res[i].VID_SERVER + "', '" + res[i].CLIENT_ADDR + "', '" + res[i].SERVER_ADDR + "', " +
    "'" + res[i].CLIENT_TUNNEL_ADDR + "', '" + res[i].SERVER_TUNNEL_ADDR + "', '" + res[i].ERROR_CODE_2 + "', '" + res[i].IPID + "', " +
    "'" + res[i].C2S_PKTS + "', '" + res[i].C2S_OCTETS + "', '" + res[i].S2C_PKTS + "', '" + res[i].S2C_OCTETS + "', " +
    "'" + res[i].NUM_SUCC_TRANS + "', '" + res[i].CONNECT_TIME + "', '" + res[i].TOTAL_RESP + "', '" + res[i].TIMEOUTS + "', " +
    "'" + res[i].RETRIES + "', '" + res[i].RAI + "', '" + res[i].TCP_SYNS + "', '" + res[i].TCP_SYN_ACKS + "', " +
    "'" + res[i].TCP_SYN_RESETS + "', '" + res[i].TCP_SYN_FINS + "', '" + res[i].EVENT_TYPE + "', '" + res[i].FLAGS + "', " +
    "'" + res[i].TIME_STAMP + "', '" + res[i].EVENT_ID + "', '" + res[i].EVENT_CODE + "')";
    OracleCommand command = new OracleCommand(sql, con);
    command.ExecuteNonQuery();
    Console.WriteLine("Successfully Inserted");
    Console.WriteLine();
    Console.WriteLine("Number of Row Data: " + jmlRecord.ToString());
    Console.WriteLine();
    Console.WriteLine("The size of {0} is {1} bytes.", f2.Name, f2.Length);
    con.Close();
    static void ShowPercentProgress(string message, int currElementIndex, int totalElementCount)
    if (currElementIndex < 0 || currElementIndex >= totalElementCount)
    throw new InvalidOperationException("currElement out of range");
    int percent = (100 * (currElementIndex + 1)) / totalElementCount;
    Console.Write("\r{0}{1}% complete", message, percent);
    if (currElementIndex == totalElementCount - 1)
    Console.WriteLine(Environment.NewLine);
    static int CountLinesInFile(string f)
    int count = 0;
    using (StreamReader r = new StreamReader(f))
    string line;
    while ((line = r.ReadLine()) != null)
    count++;
    return count;
    [DelimitedRecord(",")]
    public class XL_XDR
    public string XDR_ID;
    public string XDR_TYPE;
    public string SESSION_START_TIME;
    public string SESSION_END_TIME;
    public string SESSION_LAST_UPDATE_TIME;
    public string SESSION_FLAG;
    public string VERSION;
    public string CONNECTION_ROW_COUNT;
    public string ERROR_CODE;
    public string METHOD;
    public string HOST_LEN;
    public string HOST;
    public string URL_LEN;
    public string URL;
    public string CONNECTION_START_TIME;
    public string CONNECTION_LAST_UPDATE_TIME;
    public string CONNECTION_FLAG;
    public string CONNECTION_ID;
    public string TOTAL_EVENT_COUNT;
    public string TUNNEL_PAIR_ID;
    public string RESPONSIVENESS_TYPE;
    public string CLIENT_PORT;
    public string PAYLOAD_TYPE;
    public string VIRTUAL_TYPE;
    public string VID_CLIENT;
    public string VID_SERVER;
    public string CLIENT_ADDR;
    public string SERVER_ADDR;
    public string CLIENT_TUNNEL_ADDR;
    public string SERVER_TUNNEL_ADDR;
    public string ERROR_CODE_2;
    public string IPID;
    public string C2S_PKTS;
    public string C2S_OCTETS;
    public string S2C_PKTS;
    public string S2C_OCTETS;
    public string NUM_SUCC_TRANS;
    public string CONNECT_TIME;
    public string TOTAL_RESP;
    public string TIMEOUTS;
    public string RETRIES;
    public string RAI;
    public string TCP_SYNS;
    public string TCP_SYN_ACKS;
    public string TCP_SYN_RESETS;
    public string TCP_SYN_FINS;
    public string EVENT_TYPE;
    public string FLAGS;
    public string TIME_STAMP;
    public string EVENT_ID;
    public string EVENT_CODE;
    I hope someone can give me a solution. Thanks

    The fastest way is to use external tables or sql loader (sqlldr). (If you use external tables or sql loader, you don't use C# at all).

  • How to load text data into internal table

    I have a text file to load txt data into internal table. So how to read text data with validation and to load all text data into the internal table?
    Say this is the text file:
    IO_NAME, IO_TYPE, IO_SHTXT, IO_LONGTEXT, DATATYPE, DATA LENGTH
    ZIO_TEST1, CHA,      IO TEST1,      IO TEST 1,        CHAR,         20
    ZIO_TEST2, CHA,      IO TEST2,      IO TEST 2,        CHAR,         20
    Regards,
    Mau

    Hi,
    U can use GUI_UPLOAD for this...
    Declare an internal table like
    data: begin of itab occurs 0,
    string(1200),
    end of itab.
    check the sample code:
    cange as you need
    DATA: DATEI_PC TYPE STRING VALUE 'C:\MATNR.TXT'.
    DATA: BEGIN OF ITAB occurs 0,
    TXT(1024),
    END OF ITAB.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
    FILENAME = DATEI_PC
    FILETYPE = 'ASC'
    CHANGING
    DATA_TAB = ITAB[]
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    NOT_SUPPORTED_BY_GUI = 17
    ERROR_NO_GUI = 18
    OTHERS = 19.
    IF SY-SUBRC NE 0. WRITE: / 'Error in Uploading'. STOP. ENDIF.
    WRITE: / 'UPLOAD:'.
    LOOP AT ITAB. WRITE: / ITAB-TXT. ENDLOOP.

  • Will not print text from PDFs - all other print is fine - Using nitro reader - Win7- HP4255

    Will not print text from PDFs - all other print is fine - Using nitro reader - Win7- HP4255

    Mulga
    Welcome to the HP Community Forum.
    Have you tried asking your question on the Nitro-Reader Forum?
    Nitro Reader Forum
    If you would like to try using the Adobe Reader, you might find help here:
    Manage Print Output with Print Preview
    See the section on PDF files
    Click the Kudos Thumbs-Up to show you appreciate the help.
    Click Accept as Solution when the Answer provides a Fix or Workaround!
    I am pleased to provide assistance on behalf of HP. I do not work for HP. 
    Kind Regards,
    Dragon-Fur

  • How to automate the data load process using data load file & task Scheduler

    Hi,
    I am doing Automated Process to load the data in Hyperion Planning application with the help of data_Load.bat file & Task Scheduler.
    I have created Data_Load.bat file but rest of the process i am unable complete.
    So could you help me , how to automate the data load process using Data_load.bat file & task Scheduler or what are the rest of the file is require to achieve this.
    Thanks

    To follow up on your question are you using the maxl scripts for the dataload?
    If so I have seen and issue within the batch (ex: load_data.bat) that if you do not have the full maxl script path with a batch when running it through event task scheduler the task will work but the log and/ or error file will not be created. Meaning the batch claims it ran from the task scheduler although it didn't do what you needed it to.
    If you are using maxl use this as the batch
    "essmsh C:\data\DataLoad.mxl" Or you can also use the full path for the maxl either way works. The only reason I would think that the maxl may then not work is if you do not have the batch updated to call on all the maxl PATH changes or if you need to update your environment variables to correct the essmsh command to work in a command prompt.

  • How to create 3d photgallery in flex using xml

    How to create 3d photgallery in flex using xml . I am new to flex please help me.Thanks in advance

    How to create 3d photgallery in flex using xml . I am new to flex please help me.Thanks in advance

  • How to write the data into EEPROM using Labview?

    How to write the data into EEPROM using Labview?

    You would need some sort of EEPROM programmer. Typically might
    communicate with it via serial. I don't know how you would do this in
    LV. You would need to have the command protocol for the programming
    device to start with.
    Doug De Clue
    gpibssx wrote in message news:<[email protected]>...
    > How to write the data into EEPROM using Labview?

  • How to load text data in BI 7

    How to load text data in BI 7

    Hi Mark.
    You can load text like you load the data to Master data attributes.
    The flat file format foe text  is like 'EN', 'MAT001', 'MATERIAL1'.
    Cheers
    Sunil

  • How much of my data does Genius use updating my library ?

    I have say 100gb of music in my Itunes library and I would like to know how much of my data usage Genius uses when it first updates?

    Welcome to AD!
    I doubt any of us other users will be able to answer that. The algorithms for that genius feature are like a trade secret, aren't they?
    All I can say for certain is that a library of around 100 tracks won't provide any genius mixes.

  • Each time I print, a data page of the print job is printed out.

    Each time I print a data page of the print job is printed out. How can I Disable as it is a waste of paper?

    Hello john42gd,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    Troubleshooting printer issues in OS X
    http://support.apple.com/kb/ts3147
    Use Software Update to find and install the latest available updates. If an update is installed, see if the issue persists.
    Open the Print & Scan pane or Print & Fax (Snow Leopard) pane in System Preferences.
    Delete the affected printer, then add the printer again.
    If the issue persists, try these additional steps:
    Reset the printing system, then add the printer again.
    If the issue still persists, reset the printing system again.  Download and install your printer's drivers. Then, add the printer again.
    Contact the printer vendor or visit their website for further assistance.
    OS X Mavericks: Change or update printer software
    http://support.apple.com/kb/PH13761
    Have a nice day,
    Mario

  • I am unable to view videos in youtube using mozilla plz help

    I am unable to view videos in youtube using mozilla plz help
    duplicate of [/questions/1009851]
    edit: for some reason this user shows as deactivated which I did not do.

    Are you still able to view flash videos and games from other sites?
    If so and are from India then youtube videos among many other sites were blocked. https://support.mozilla.org/en-US/forums/contributors/710463

  • I want to add an application like winrar useing rar file so i can auto download it all thet i have is a zip fill but i want a rar file too the option to auto download it is gray so i cant use it plz help me.

    i want to add an application like winrar useing rar file so i can auto download it all thet i have is a zip fill but i want a rar file too the option to auto download it is gray so i cant use it plz help me.
    == This happened ==
    Every time Firefox opened
    == all the time

    Here is the answer: Not an add on or plug-in! In fact you can get rid of all those useless plugins and add-ons! Go and get it. Im using the Alpha version right now and it works great. Works better then anything else .......add multiple links for all files sit back and relax. Its all done for you with no more intervention on your part! Check it out!
    http://wordrider.net/freerapid/
    Only one downside to this. No proper installer. You will have to copy the files to your respective programs folder.
    C:\Program Files\FreeRapid or C:\Program Files (x86)\FreeRapid
    Then create shortcuts to your desktop from FRD app. Thats it then start downloading!
    By the way this not an add. I just spent the whole night looking for the solution to this problem because I was so frustrated with the whole thing. I download tons of files and I have lots of other projects going and I dont have time for all this nonsense with RapidShare and Firefox. Hope this helps some other poor souls out there!

  • How to enter TEXT data using rules files

    Hi,
    How can i enter text data using rules files?
    Thanks,
    A

    If you are talking about planning members with a text data type then it is not possible to load the actual text string using a load rule,essbase just stores a numeric value and the text string relating to that numeric value is stored in the planning applications relational tables.
    If you want to load text directly then you can load data through the planning layer, more information available at - http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_admin/ch05s02s01.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How do I sort data in columns using Pages

    How do I sort data in columns (alphabetically) using Pages?

    If you are referring to text or numbers in a column (not table), then get the free Service plug-in WordService, from Devon Technologies. Put it in the
    /Users/yourlogin/Library/Services folder location.
    Select your data to be sorted. From the Pages menu > Services > Sort Ascending will do the trick. This will work with Pages ’09 and Pages v5.2 or later, as well as Apple Mail, TextEdit, etc.
    The WordService files include a PDF (Read Me) that describes the services included with the package.
    The Service items will only appear in the Services submenu when you have selected your data prior to sort. If these WordService items do not appear in the Services menu as they should per the preceding sentence, then you will need to enable them.
    System Preferences > Keyboard > Shortcuts > Services. Scroll through the right hand list of services until you encounter Sort Ascending and ensure that it is selected.
    If you were referring to sorting a column of data in a table:
    Pages ’09
    Select all cells containing your unordered data. In the Table Inspector, under Edit Rows & Columns, choose Sort Ascending.
    Pages v5.2
    Select cells as before. In the Table heading (A, B, C, etc.) when you roll over the letter, a down-arrow appears. Click, and choose Sort Ascending from the drop down menu.

  • How to UPDATE MASTER DATA RECORD PA0377 using FM HR_INFOTYPE_OPERATION

    How to UPDATE MASTER DATA RECORD IN INFOTYPE 0377 DIRECTLY using function module HR_INFOTYPE_OPERATION ? When i use operation = 'MOD'  im getting an ERROR as NO DATA STORED FOR 0377 IN SELECTION PERIOD.
           Can anyone please help me how to use HR_INFOTYPE_OPERATION to UPDATE MASTER DATA RECORD.
    Thanks,
    Karthi.

    Hi,
    please check this code
    it is very useful
    infotypes: 0105.
    parameters: p_pernr type p0105-pernr,
                p_subty type p0105-subty,
                p_begda type p0105-begda,
                p_endda type p0105-endda,
                p_opera type pspar-actio,
                p_usrid type p0105-usrid,
                p_commt as checkbox.    "Useful only when NO_COMMIT is 'X'
    data: w_return type bapireturn1,    "Error handling data
          w_key type bapipakey,         "If record has been created or changed the created/ changed
                                        "record's key (PSKEY) will be populated
          v_message type string.        "For printing returned messages
    call function 'BAPI_EMPLOYEE_ENQUEUE'
      exporting
        number = p_pernr
      importing
        return = w_return.
    if w_return is initial. "Employee is not locked
      p0105-pernr = p_pernr.
      p0105-subty =
      p0105-usrty = p_subty.
      p0105-begda = p_begda.
      p0105-endda = p_endda.
      p0105-usrid = p_usrid.
    *Calls Internally HR_MAINTAIN_MASTERDATA
      call function 'HR_INFOTYPE_OPERATION'
        exporting
          infty         = '0105'
          number        = p_pernr
          subtype       = p_subty
          validityend   = p_endda
          validitybegin = p_begda
          record        = p0105
          operation     = p_opera
          dialog_mode   = '0'
          nocommit      = 'X'
        importing
          return        = w_return
          key           = w_key.
    endif.
    if w_return is not initial.
      message id w_return-id type w_return-type number w_return-number
              with w_return-message_v1 w_return-message_v2 w_return-message_v3
              w_return-message_v4 into v_message.
      case w_return-type.
        when 'A' or 'E'.
          format color col_negative. write:/ v_message.
        when others.
          format color col_heading. write:/ v_message.
      endcase.
      call function 'BAPI_EMPLOYEE_DEQUEUE'
        exporting
          number = p_pernr.
    else.
      format color col_positive. write:/ 'Record Updated Successfully.'.
      if w_key is not initial.
        write:/ 'Key contains',
              / 'Personnel Number:', w_key-employeeno,
              / 'Subtype (absence type):', w_key-subtype,
              / 'Start date of Absence:', w_key-validbegin,
              / 'End date of Absence:', w_key-validend.
      endif.
      commit work.
    endif.
    Thanks and regards
    durga.K

Maybe you are looking for