To export contents of a DataGrid to a PDF file.

Hi All,
I'm having a mx:DataGrid component that has some 6 columns
and around 150 rows. I need to add a feature wherein a user with
the click of a button should be able to see the contents of that
DataGrid in a PDF file and do operations like save, print etc on
that file.
Any help on how to do this would be appreciated.
Thanks in Advance.

Hi,
There are server side and client side PDF generation tools
available.
Check out iText (server side):
http://www.lowagie.com/iText/
Check out AlivePDF (Client side PDF generation):
http://alivepdf.bytearray.org/
That being said, if your aim is only getting the datagrid
printed, check out PrintDataGrid:
http://livedocs.adobe.com/flex/3/langref/mx/printing/PrintDataGrid.html

Similar Messages

  • Is it possible to export the page activity report to a pdf file?

    Is it possible to export the page activity report to a pdf file?and is there any api or samples to be reference

    Do you mean audit history?   One method would be similar to the following sample that you could extend to create a PDF from the data returned:
    http://www.eyelock.net/blog/archives/533
    BUT the method used above via JCR Query is an implementation detail.  For future proofing, you should use the ReplicationStatus status = page.adaptTo(ReplicationStatus.class in your code to get the audit logs for a particular page, rather than a straight JCR query. (recommended by Jörg Hoh @ http://forums.adobe.com/message/5253760).

  • How to Convert the content in BLOB field into a PDF file...

    Hi,
    I am having PDF files stored in BLOB column of a table in Oracle Database (11G R2).
    I want to retrieve the files back and store them in hard disk. I am successful in storing the content as a file with '.doc' but if I store the file as '.pdf', adobe fails to open the file with error
    Adobe Reader could not open file 'xxx.pdf' because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)
    I am using following example code to achieve my goal...
    Declare
    b blob;
    c clob;
    buffer VARCHAR2(32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER(38);
    file_handle UTL_FILE.FILE_TYPE;
    begin
    select blob_data into b from blobdata where id=1;
    c := blob2clob(b);
    file_handle := UTL_FILE.FOPEN('BLOB2FILE','my_file.pdf','w',buffer_size);
         amount := buffer_size;
         offset := 1;
         WHILE amount >= buffer_size
         LOOP
              DBMS_LOB.READ(c,amount,offset,buffer);
              -- buffer:=replace(buffer,chr(13),'');
              offset := offset + amount;
              UTL_FILE.PUT(file_handle,buffer);
              UTL_FILE.FFLUSH(file_handle);
         END LOOP;
         UTL_FILE.FCLOSE(file_handle);
    end;
    create or replace FUNCTION BLOB2CLOB ( p_blob IN BLOB ) RETURN CLOB
    -- typecasts BLOB to CLOB (binary conversion)
    IS
    || Purpose : To Convert a BLOB File to CLOB File
    || INPUT : BLOB File
    || OUTPUT : CLOB File
    || History: MB V5.0 24.09.2007 RCMS00318572 Initial version
    ln_file_check NUMBER;
    ln_file_size NUMBER;
    v_text_file CLOB;
    v_binary_file BLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_warning INTEGER;
    lv_data CLOB;
    ln_length NUMBER;
    csid VARCHAR2(100) := DBMS_LOB.DEFAULT_CSID;
    V_LANG_CONTEXT NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    BEGIN
    DBMS_LOB.createtemporary (v_text_file, TRUE);
    SELECT dbms_lob.getlength(p_blob) INTO ln_file_size FROM DUAL;
    DBMS_LOB.converttoclob (v_text_file, p_blob, ln_file_size, v_dest_offset, v_src_offset, 0, v_lang_context, v_warning);
    SELECT dbms_lob.getlength(v_text_file) INTO ln_length FROM DUAL;
    RETURN v_text_file;
    END;

    user755667 wrote:
    Hi,
    I am having PDF files stored in BLOB column of a table in Oracle Database (11G R2).
    I want to retrieve the files back and store them in hard disk. I am successful in storing the content as a file with '.doc' but if I store the file as '.pdf', adobe fails to open the file with error
    Adobe Reader could not open file 'xxx.pdf' because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)
    I am using following example code to achieve my goal...
    Declare
    b blob;
    c clob;
    buffer VARCHAR2(32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER(38);
    file_handle UTL_FILE.FILE_TYPE;
    begin
    select blob_data into b from blobdata where id=1;
    c := blob2clob(b);
    file_handle := UTL_FILE.FOPEN('BLOB2FILE','my_file.pdf','w',buffer_size);
         amount := buffer_size;
         offset := 1;
         WHILE amount >= buffer_size
         LOOP
              DBMS_LOB.READ(c,amount,offset,buffer);
              -- buffer:=replace(buffer,chr(13),'');
              offset := offset + amount;
              UTL_FILE.PUT(file_handle,buffer);
              UTL_FILE.FFLUSH(file_handle);
         END LOOP;
         UTL_FILE.FCLOSE(file_handle);
    end;
    create or replace FUNCTION BLOB2CLOB ( p_blob IN BLOB ) RETURN CLOB
    -- typecasts BLOB to CLOB (binary conversion)
    IS
    || Purpose : To Convert a BLOB File to CLOB File
    || INPUT : BLOB File
    || OUTPUT : CLOB File
    || History: MB V5.0 24.09.2007 RCMS00318572 Initial version
    ln_file_check NUMBER;
    ln_file_size NUMBER;
    v_text_file CLOB;
    v_binary_file BLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_warning INTEGER;
    lv_data CLOB;
    ln_length NUMBER;
    csid VARCHAR2(100) := DBMS_LOB.DEFAULT_CSID;
    V_LANG_CONTEXT NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    BEGIN
    DBMS_LOB.createtemporary (v_text_file, TRUE);
    SELECT dbms_lob.getlength(p_blob) INTO ln_file_size FROM DUAL;
    DBMS_LOB.converttoclob (v_text_file, p_blob, ln_file_size, v_dest_offset, v_src_offset, 0, v_lang_context, v_warning);
    SELECT dbms_lob.getlength(v_text_file) INTO ln_length FROM DUAL;
    RETURN v_text_file;
    END;I skimmed this and stopped reading when i saw the BLOB to CLOB function.
    You can't convert binary data into character based data.
    So very likely this is your problem.

  • How to resolve Content not allowed in prolog with PDF files

    We are using PI 7.1 to read a file and using ASMA get the file name and pass it to a target mapping and call a web service with the file name.
    We have a scenario that reads a PDF file as Binary form a folder.  Our mapper uses ASMA to get the file name and folder of the
    file to map to the target.
    Testing in mapper works fine except for the ASMA does not function (known issue).
    At runtime we drop a file and it is picked up as expected BUT from SXMB_MONI we see the following:
    Runtime exception occurred during application mapping com/sap/xi/tf/_MM_FileNotification_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Content is not allowed in prolog.
    This error does not happen all the time either.  When it appears it is typically only the first time a file is mapped and on subsequent retries it processes normally.  In dev we have shown that PI seems to get stuck on a few initial files u2013 process properly on the first retry and then at some point has no issues and will process files very fast.
    u201CContent not allowed in prologu201D at least from an XML perspective is related to characters appearing before the xml file declaration:
    <?xml version="1.0".encoding="UTF-8"?>
    If chars appear before this you get this error in Java parsers.  This could be related but we do not have control over how PI parsed the file content and puts into XML messages inside the mapper as we do nothing with the file content.
    The same file will go through randomly with this exception on multiple drops.  Sometimes it gets processed properly and sometime it doesnu2019t u2013 but in dev it u201Calwaysu201D gets processed properly on the automatic retry.  It does not seem to matter what PDF we drop in there either.
    Our tyoes look something like this:
    Source:
    DT_FILE - xsd:hexBinary
    Target:
    FilePath - xsd:String
    I have tried with DT_FILE as xsd:base64Binary with the same results...
    We use a UDF to get the file name from ASMA as follows:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    String ourSourceFileName = conf.get(key1);
    String ourSourceDirName = conf.get(key2);
    //conf.put(key1, ourSourceDirName + "/" + ourSourceFileName);
    return ourSourceDirName + "
    ToProcess
    " + ourSourceFileName;
    Edited by: Carey Bingham on May 26, 2010 12:24 AM

    > Is using a custom adapter module the standard way to handle files when we do not want the content? 
    I would rather say this is a feasible solution
    > If so does anyone have generic code that we can use for the purposes of simply monitoring a file and passing the file name/folder out implemented as modules already?
    The questio is. What do you want to do with this information?
    Here is a sample code written for a specific purpose, you can adapt this to your needs:
    http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0SetAttachmentName
    > Is this a known workaround to get around the "content not allowed in prolog" issue?
    At least it is known by me

  • Corrupted content error when trying to download .pdf file from one website.

    Unable to download .pdf file from a website, but IE8 provided the download without hesitation.
    Both v7 and v8 produced the same message:
    "Corrupted content error"
    The page you are trying to view cannot be shown because an error in the data transmission was detected.
    This may be a particular website problem, or it may be common to the particular industry segment and their protocols.
    I have followed the help leads and examined the profile for Firefox as used in this instance. Nothing untoward seemed to pop out as a causal factor.

    Reworked some of the javascript for our webserver and fixed the problem.

  • Why can't I export my newsletter from CS into a pdf file all of a sudden?

    Why can't I export my newsletter from CS into a psf file all of a sudden?

    We can't know. You are not providing any relevant details - program versions, system information, PDF settings used and so on.
    Mylenium

  • Can i make copying of content impossible when converting word to pdf-file?

    When i copy my signature (for hardcopies) onto a wordfile and i wish to make it impossible for others to retrieve it from the pdf file.
    How can i realise this?

    Hi frankv,
    That isn't something that you can do during the conversion process. But, with Acrobat, you can apply security constraints to the file, which would prevent people who are viewing the PDF from copying the contents of the PDF. See Acrobat Help | Securing PDFs with passwords for more information. If you don't have Acrobat, you're welcome to give it a try. You can download a 30-day trial from http://www.adobe.com/products/acrobat.html.
    Best,
    Sara

  • Download the binary content of a table as a pdf file

    Hi @all,
    my function get some binary data in an internal table (structure TBL1024).
    This function is called from a bsp. The content of the internal table needs to be possible to be downloaded as pdf.
    There needs to appear a popup, with some file information (name,(pdf) type) and buttons, where you can chose whether to download or to open the file.
    How is it possible to show the download popup and to download the file as pdf?
    Thanks,
    Andi

    Hi,
    Check this help for opening files
    http://help.sap.com/saphelp_nw2004s/helpdata/en/79/c554a0b3dc11d5993800508b6b8b11/frameset.htm
    and this
    for downloading it to your PC
    http://help.sap.com/saphelp_nw2004s/helpdata/en/79/c554a3b3dc11d5993800508b6b8b11/frameset.htm
    Eddy

  • Exporting Mark-Ups and Comments from a PDF file

    Hello,
    I know there are several options for exporting comments associated with highlighted text in Adobe Acrobat Standard, but is there a way to export both the comment AND the marked up text all together?
    Thank you.

    The built-in Summarize Comments tool in Acrobat only uses the text in the comment itself, so if you've made a bunch of comments without enabling the setting mentioned above, you're screwed... Well, almost.
    I've developed a tool that allows you to retroactively copy the highlighted text back into the comment, while preserving any comments you might have made yourself.
    See here: http://try67.blogspot.com/2011/04/acrobat-retroactively-copy-selected.html

  • Export of only a part of a PDF File!!

    I need help to export my just transaction detail from the Visa Bill PDF that I just created to a excel spreadsheet. I have tried cut/copy and pasting & exporting tables to no avail. I need to have it formatted in the same fashion as the Excel spreadsheet, so the data fills in the right columns.
    Can anyone point me in the right direction??? soon?

    Have you tried the column copy? You can also copy and paste one column at a time holding the shift key as you select the column. Then simply copy and paste. (OK, it might be alt key, but the idea is the same)

  • I've exported my pages graphics document as a PDF file and can't seem to reduce the file size without compromising the quality of the photo's used even after choosing "best" quality.  I'm trying to send the file via e-mail but it's too big.  ??????

    I am trying to e-mail a graphics pages document I made as a PDF file.  After trying to resize the file, the photo's quality is compromised (really blurry) even after choosing "Best" quality.  What am I doing wrong.  As a regular full sized file (PDF) it's fine, but when it gets reduced, it's bad and it needs to get printed from the e-mail copy I'm trying to send.  HELP! Please.

    If there are a lot and/or large images the file will inevitably be large, no matter what.
    You can reduce them down as far as possible by cropping and scaling them to the final size before creating the pdf. You can do this by opening the images in Preview .app and using Menu > Tools to reduce the resolution and to crop.
    If you have used transparency effects eg shadow, reflection, transparency, 3D charts, OSX will by default render these at 72dpi in the pdf.
    Peter

  • Exporting content of my canvas to pdf file.

    Hello,
         I am using flex sdk4.0, I have used mx:canvas in my application. I have added images on canvas using drag and drop mechanism in my application. Now on a button click I want to export the whole content of the canvas to a pdf file. I have gone through the client side pdf creation library called as AlivePDF but its getting difficult to understand.
         Anyone has used AlivePDF library for exporting something to pdf..?
    Thank you in advance.

    I use purepdf for this. check these examples : http://code.google.com/p/purepdf/wiki/Examples

  • Export raw excel dato to fill-able PDF

    Hi Guys
    Im new to the forum and this is my first thread - I really hope you can help me (sorry for my english, its been a while since i've been using it).
    I would like to be able to export raw data from Excel to a PDF file, which is fill-able / editable.
    1) Lets say that my Excel file looks as follows:
    A1     =     Title of project
    A2     =     Adobe Acrobat project
    A3     =     Adobe Reader project
    A4     =     Adobe Photoshop project
    B1     =     Idea behind the project
    B2     =     The idea behind the project is to analyse, if Adobe Acrobat is a useable program.
    B3     =     etc.
    B4     =     etc.
    2) And I have a .PDF file thats like this:
    Text "Title of project:" And a textbox which can be filled out (the fill-able box is called "Title of project" in preferences)
    Text "Idea behind the project" And a textbox which can be filled out (the fill-able box is called "Idea behind the project" in preferences)
    3) How can I get the data from A2 into the .PDF files "Title of project" and the data from B2 into the .PDF files "Idea behind the project"
    I have tried to save the Excel file as .CSV and .TXT and import it into the .PDF, but get an error doing so.
    I just need the basic understanding, so I can start develooment from there.

    Have you read the documentation on importing/exporting text to and from a PDF?
    You need to arrange the data like a database table. The top row is the column name and corresponds to the Acrobat field name, then the next line is the first line of data and each following line is the next data record.

  • How to export multiples pages in one PDF file?

    I understand i can export image to a PDF file format.
    Is there a way to export a few pages in a single PDF file?

    Another method:
    http://forums.adobe.com/message/4506582#4506582

  • Error in Export Content Archive

    Hi,
    I am trying to export Content Archive using Archiver applet present in the admin applets but its getting failed, while the Table Archive was done successfully.
    The error I am getting is as below:
    "Export error for archive 'ContentArchive_13June'" in collection 'Eb_UCM': Aborting. Too many errors ".
    And the logs present in the log files are:
    Warning     6/14/2011 11:09:27 AM     Unable to rename '/home/ucmuser/oracle/ucm/server/weblayout/resources/schema.work' to '/home/ucmuser/oracle/ucm/server/weblayout/resources/schema' while publishing schema.
    Error     6/14/2011 11:09:27 AM     Unable to publish the schema. Published schema directory could not be swapped into its proper location. [ Details ]
    I have also tried after changing the file permissions on /home/ucmuser/oracle/ucm/server/weblayout/resources/schema.work, but the same logs are comming.
    Please help.
    Thnks,
    Sunny

    Hi,
    Add Configuration Variable MaxArchiveErrorsAllowed=500 at config.cfg file and restart content server, try to export your archiver.
    If you still getting same error message like "to many errors" then increase value 500 to 1000.
    Thanks,
    Ravinder

Maybe you are looking for

  • Itunes does not work after Update any more

    Itunes does not start after the uodate and cannot be reinstalled. Seems not only a problem to me Any solutions yet ?

  • Keyboard no longer lights on Macbook Pro

    It was working fine, but now it just doesn't light at all.  I checked System Preferences but there was nothing for keyboard lights.  Is this a sign of a bigger issue?

  • IChat Video Not Working? 2012

    I have... Mac OS X Version 10.6.8 MacBook Pro My iChat is connected to Gmail. My iChat allows video and voice calls. However, when I try to make any call, the buttons below are idle. Meaning, it cannot be pressed. The idle buttons look like this: See

  • What's the regex pattern for regular English chars and numbers ...

    In Java String there is a matches(String regex) method, how can I specify the regex for regular English chars, I want it to tell me if the string contains non-English chars. The string is from an email, my application wants to know if the email conta

  • QuickTime Error:-23

    QuickTime Error:-23 I have been getting this error in Compressor when I try to render out of FCP and have tried reinstalling FCP and Compressor and then QuickTime 7.6.4. Has anyone ever seen this. I am running OS 10.5.8 FCP 6.0.6 and QuickTime 7.6.4