Rendering PDF in flex

Hi all,
I have a task of rendering a PDF in the screen. Could anyone
please help me out in this aspect. Is there a way for rendering PDF
into a component in flex.
Thanks,
AMAR

The Flash Player isn't capable of displaying a PDF. There are
tricks you can do, like using IFRAMEs or pop-up browser windows,
etc. I've seen some very cool integration of Flash and HTML from a
number of talented people. Keep searching the web, you may come
across something that will help.

Similar Messages

  • Safari 7.0.6, using Adobe Acrobat 11.0.10, aren't rendering pdf files in the Print Preview screen.  Additionally, only a single, blank page prints for a multi-page pdf document.  Any ideas?

    Safari 7.0.6, using Adobe Acrobat 11.0.10, isn't rendering pdf files in the Print Preview screen.  Additionally, only a single, blank page prints for a multi-page pdf document.  Any ideas?

    Figured it out.  It had nothing to do with the software levels of Safari or Adobe Acrobat.  Here's the fix:
    Open Finder/Applications
    Search "Internet Plug-Ins"
    Move any Adobe plug-ins to the trash
    Quit Safari
    Launch Safari
    Your pdf document should now render in Print Preview and print properly.

  • Create a pdf in flex

    Hi, i wanna create a pdf or a doc in flex builder for a website, i was watching a tutorial on XPAAJ but they dont have it anymore.
    i also tried fpdf where u create a pdf using php, but for some reason when i pass the data it doesnt create it.
    Any ideas?
    Thanks.

    pls check out this link
    http://sunilrana.wordpress.com/2010/01/01/to-create-pdf-in-flex
    also download alivepdf from
    code.google.com/p/alivepdf/downloads/list
    Thanks
    Happy New Year

  • Conversion of PDF from flex

    Hai
       I need to create pdf generation from flex.
       I tried with LCDS and there is no way to create XDP template.
       live cycle designer needs dotnet support.. but i need to do with j2ee..
       is any other approach to create pdf from flex with j2ee environment???
       thanks in advance...

    Hi there, there's a library called AlivePDF that allows you to create pdf files from Flex. Maybe that's what you're looking for.

  • How I Got WYSIWYG TLF Text To PDF from Flex

    Awesome results read more here:  http://hybridmindset.com/blog/How-I-Got-WYSIWYG-TLF-Text-To-PDF-from-Flex-Part-1

    Hi,
    Adobe Reader currently doesn't support Text to Speech, but we have added this to our database for consideration in a future release.
    Thanks for your feedback!
    -Gaurav

  • Stop Safari from rendering PDF natively

    According to this Adobe article, Safari 5.1 renders PDF documents natively. I have Safari 5.1 (7534.48.3) on Lion 10.7.1.
    I am tired of Safari opeing PDF's automatically for me. I would like to download PDF's when I left-click on links for PDF's.
    (1) Terminal commands such as defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES no longer work.
    (2) I made sure that AdobePDF does not exist in /Library/Internet Plug-Ins.
    Any idea? 

    I am having a similar (if not the same) problem.  When I go to certain websites, instead of displaying the image in the window, Safari automatically downloads files with such names as get.php.pdf or dlraw.cgi.pdf.  This didn't happen before on the same websites.  I contacted one of the site owners, and they haven't changed anything.  Unfortuantely, on both sites (Lybrary.com and askalexander.org) you need my password to get at the pages I'm having trouble with, so I can't point you to a page directly.
    On other sites, Safari is acting as expected (shows the pdf in the window without any download).
    I'm running OS 10.6.8 and Safari 5.1
    Any help would be appreciated.
    Thanks,
    Frank

  • View Encrypted PDF in Flex

    Hi,
    I'm trying to find out how to view an encrypted PDF programmatically in Flex. I would like to be able to do several things:
    1) View an encrypted pdf on my local machine and do it by decrypting with the password through ActionScript.
    2) Allow for viewing a pdf from a memory stream.
    So far, I have been able to view a PDF using the HTMLLoader class, but I don't think this allows me to enter the decryption password for a pdf programmatically. I already have a PDF that was encrypted using Adobe Acrobat's encryption. Any help would be greatly appreciated. Thanks
    -Aaron

    kilyas, I to once thought it would be simple to load pdf's
    into flex however there is no easy way to accomplish this task.
    Whenever a pdf is loaded acrobat reader is always going to want to
    take over the control of this. The one solution that I however did
    come up with is by using one of the HTML component renderers within
    flex. Something like this
    http://www.flexcapacitor.com/htmlcomponent/examples/HTMLFrameInApplication.html
    once you have that component loading html urls correctly you can
    then set the url straight to the pdf. This will then launch adobe
    reader inside of your html component and allow the user to "view a
    pdf within flex" kind of... The major flaw I've found with this is
    it seems to lag when the browser window containing the flex
    application is moved around as well as resized. If anyone has a
    better solution though I would also like to hear it.

  • Generate PDF From Flex

    Hi All,
    I am doing a Reporting/Chart application in FLEX. we need to
    generate PDF from FLEX. Report data will be 5-10 pages, How we can
    do this? Please advise.
    Thanks
    Subhash

    Hi,
    thanks for your reply. I tried with alive pdf, but source
    code only AIR files. can we use this in web based flex?. How we can
    format the report like html code? I just see in alivepdf, its only
    linebyline display, not multiple columns? pls advise.
    thanks alot
    Subhash

  • SaveFrameBookAsPdf using FDK11 gets the contents cropped to the top and right of the rendered PDF.

    Hi,
    I am using a method to Save Frame file as PDF using FDK 11 and this works fine. Currently, I have a requirement to Save the whole Frame book as PDF for which i am trying with the same method but the output is not accurate. The contents in the rendered PDF is cropped to the Top and Right. Tried several options and could not figure out the cause of the issue. any help would be highly appreciated.
    Used Method:
               long SaveAsPdf(char* strSourceFileName, char* strTargetFileName)
                    F_PropValsT params, *returnParams = NULL;
                    F_ObjHandleT docId, pgfId, saveId;
                    IntT i = 0;
                    StringT name = NULL;
                    StringT str_Target_File_Name;
                    long bookId;
                    str_Target_File_Name = F_StrCopyString((StringT)strTargetFileName);  
                    F_FdeInit();
                    /* Open all files */
                    bookId = openBookFiles(strSourceFileName);
                    /* Get docId in order to set Acrobat Bookmark levels */
                    docId = F_ApiGetId(FV_SessionId, FV_SessionId, FP_FirstOpenDoc);
                    /* Sets the save parameters so as to save as PDF and allow user to name file.*/
                    params = F_ApiGetSaveDefaultParams();
                    i = F_ApiGetPropIndex(&params, FS_FileType);
                    params.val[i].propVal.u.ival = FV_SaveFmtPdf;
                    /* Saves the book and all its components to one PDF file */
                    saveId = F_ApiSave(bookId, str_Target_File_Name, &params, &returnParams);
                    /* Close the open files.*/
                    while (docId)
                        F_ApiClose(docId, FF_CLOSE_MODIFIED);
                        docId = F_ApiGetId(FV_SessionId, FV_SessionId, FP_NextOpenDocInSession);
                    F_ApiDeallocatePropVals(&params);
                    F_ApiDeallocatePropVals(returnParams);
                    return (long)saveId;
                long openBookFiles(char* strSourceFileName)
                    IntT i = 0;
                    F_PropValsT script, *returnp = NULL;
                    F_ObjHandleT compId;
                    F_ObjHandleT docId;
                    StringT compName = NULL;
                    StringT str_Source_File_Name;
                    str_Source_File_Name = F_StrCopyString((StringT)strSourceFileName);  
                    /* create open script which minimizes user response*/
                    script = F_ApiGetOpenDefaultParams();
                    i = F_ApiGetPropIndex(&script, FS_MakeVisible);
                    script.val[i].propVal.u.ival = False;
                    i = F_ApiGetPropIndex(&script, FS_RefFileNotFound);
                    script.val[i].propVal.u.ival = FV_AllowAllRefFilesUnFindable;
                    i = F_ApiGetPropIndex(&script, FS_FileIsOldVersion);
                    script.val[i].propVal.u.ival = FV_DoOK;
                    i = F_ApiGetPropIndex(&script, FS_FontChangedMetric);
                    script.val[i].propVal.u.ival = FV_DoOK;
                    i = F_ApiGetPropIndex(&script, FS_FontNotFoundInCatalog);
                    script.val[i].propVal.u.ival = FV_DoOK;
                    i = F_ApiGetPropIndex(&script, FS_FontNotFoundInDoc);
                    script.val[i].propVal.u.ival = FV_DoOK;
                    i = F_ApiGetPropIndex(&script, FS_LanguageNotAvailable);
                    script.val[i].propVal.u.ival = FV_DoOK;
                    i = F_ApiGetPropIndex(&script, FS_LockCantBeReset);
                    script.val[i].propVal.u.ival = FV_DoOK;
                    i = F_ApiGetPropIndex(&script, FS_UpdateTextReferences);
                    script.val[i].propVal.u.ival = FV_DoNo;
                    i = F_ApiGetPropIndex(&script, FS_UpdateXRefs);
                    script.val[i].propVal.u.ival = FV_DoNo;
                    i = F_ApiGetPropIndex(&script, FS_UseAutoSaveFile);
                    script.val[i].propVal.u.ival = FV_DoNo;
                    i = F_ApiGetPropIndex(&script, FS_UseRecoverFile);
                    script.val[i].propVal.u.ival = FV_DoNo;
                    i = F_ApiGetPropIndex(&script, FS_AlertUserAboutFailure);
                    script.val[i].propVal.u.ival = False;
                    i = F_ApiGetPropIndex(&script, FS_BeefyDoc);
                    script.val[i].propVal.u.ival = FV_DoOK;
                    i = F_ApiGetPropIndex(&script, FS_FileIsInUse);
                    script.val[i].propVal.u.ival = FV_OpenViewOnly;
                    i = F_ApiGetPropIndex(&script, FS_FileIsStructured);
                    script.val[i].propVal.u.ival = FV_OpenViewOnly;
                    i = F_ApiGetPropIndex(&script, FS_OpenFileNotWritable);
                    script.val[i].propVal.u.ival = FV_DoOK;
                    long bookId = F_ApiOpen(str_Source_File_Name, &script, &returnp);
                    F_ApiDeallocatePropVals(&script);
                    return long(bookId);

    Here's a clip:
    http://depositfiles.com/files/xqqnadc88
    This clip is made up of two clips on top of one another, Video 1 has a 50% right crop and Video 2 has a 50% left crop.  Video 2 crossfades into a clip of the scene with no actors in it which also has a 50% left crop.  I have had this issue on footage shot with two different cameras, one a Sony HD camcorder and the other a little Fujifilm point and shoot still camera with HD video capabilities.  Perhaps "randomly" is the wrong word to use though because I have tried recreating this and other scenes from scratch a few times and I always have the same problem with the right side of the screen disappearing at the same time no matter what I do.  In the project I am working on, I have several scenes where this effect is needed and some of the footage seems to work fine while other scenes consistently give me this issue.
    I also just remembered that I have CS4 (but CS3 runs a little better on my computer) so I'll try putting the clip together in CS4 and see if it still does the same thing.

  • Generating PDF with Flex App (swf) embedded

    Hi,
    Does anyone has the experience in developing a Flex Application that is to be
    embedded into a PDF and open in the Reader/Acrobat for data capturing?
    How to embed the Flex Application (swf) into a PDF in a Livecycle process?
    With the XML data prepopulated into the PDF (embedded with a schema) and
    accessible by the Flex Application when open in Reader/Acrobat.
    Users will still be able to save the data filled in the Flex Application into the PDF
    and also to generate a XML data (with data capturing in the Flex App) to be
    submitted back to the server.
    How can these be achieve? Any example?
    Thanks alot.

    Just wondering, am I in the correct section of the forum? it seems like most of the discussions listed here are related to form designing rather than form rendering.
    I know this is FORMS ES section, just that i come across something that might related to the topic.
    Has anyone try out Adobe LiveCycle PDF Generator ES2 new features?
    Based on Adobe Upgrade Center http://www.adobe.com/products/livecycle/upgrade/pdfgenerator.html, it mentioned that PDF Generator ES2 has the ability to embed SWF files in PDF.
    But is this also applicable to Flex Application compiled SWF file?
    Does the generated PDF function as a normal interactive form?
    Able to retain its embedded schema and objects (scripts)?
    I will try to install LC ES2 to try out but need sometime to setup the system, really appreciate if someone can give me a head start.
    Thanks.

  • Rendering pdf document properly in JSP

    I am currently working on a Portal project, which requires generating a PDF file and passing this to a JSP file providing an option to the user to either view the PDF file or download and save it. I've accomplished the first part of file creation (I am using iText for generating the pdf document), but I�m unable to send the file from server to the client side (ie to the browser).
    The code
    response.setContentType("application/pdf");
    response.setHeader("Content-Disposition", "inline; filename=file.pdf");
    which works perfectly fine when used as a standalone to popup an PDF file in tomcat server but fails to accomplish to render the outputstream properly(the stream is rendered in the JSP page improperly as text instead of associating with the application for reading pdf document�s) in the Portal Server Environment. Can anyone throw some light into this problem?

    The code is in JSP.
    What is the difference in putting the code in JSP or servlet.
    How is it working in standalone mode in tomcat application server.

  • PREVIEW 3.0.9 SUDDENLY STOPPED RENDERING PDF FILES PROPERLY.  How to fix?

    I have been using Preview to open PDF files on the MacBook Pro since I bought it a little less than a year ago. Then just the other day, I opened a PDF file and it looked horrible. The color was missing. Part of the text was missing. Some of the text was present and in the right place. (I had not made any recent changes to my self. No software or hardware added or removed recently.)
    I am fairly certain that the problem is with Preview or some other Apple program or utility that works with it. I sent by e-mail the PDF file to my wife's PC. I then opened the PDF file in the Adobe Reader on her machine that it was rendered perfectly.
    One other thing: In my frustration I went to the Adobe site and downloaded Adobe PDF reader for Mac. And I think installed it. But when I try to open a PDF file, Preview opens it, regardless of whatever else I do. Even if I have Preview closed and Adobe PDF reader for Mac open, Preview jumps in and opens the PDF file. And it looks horrible.
    So, in summary, what I'd like to do:
    1) Get Preview running properly again; and
    2) Learn how to control what program opens PDF files.
    Thanks gang!
    REG CROWDER
    <Edited by Moderator>

    Hi Reg,
    Is this happening with all PDF files, or just this one that you mentioned in your post?
    2) Learn how to control what program opens PDF files.
    There's a few different ways to do this.
    1. Open Adobe Reader and simply drag-n-drop the PDF file onto the Adobe Reader icon that appears in the Dock
    2. Right-click (or hold the ctrl key and click on a single button mouse/trackpad) the PDF file and choose Open With... > Adobe Reader
    3. Select the PDF file, then press command+i to bring up the information window and change the default application towards the bottom of that window.
    Edit: Probably unrelated, but are you still on 10.4.10 as mentioned in your profile tag line? 10.4.11 is the latest version of Tiger available.

  • .fdf from server and .pdf as flex resource

    I'm building an internal app, so I'm not concerned about initial size.  Once developed it should be cached on the local box.
    I have to generate various 30 page PDF's that are already defined.  I can populate them on the server using a tool like pdftk and then download them to my flex app just like any PDF.
    I would like to only download the .fdf file and have the .pdf file as a resource internal to my flex 4 app.  The purpose is to conserve bandwidth when the app is running at remote facilities.
    It seems like the .fdf has an internal pointer to the .pdf, but I cannot seem to get it to work.  I'm guessing that the path is relevant to the directory that contains my .swf.
    Has anyone done this or can point me in the right direction???
    A snippet of my .fdf file follows:
    %FDF-1.2
    1 0 obj
    <</FDF<</F(/templates/NC.pdf)/Fields[
    <</T(form1[0].#pageSet[0].MasterPage1[0].Resident[0])/V(Minnie Mouse)>>
    <</T(form1[0].#pageSet[0].MasterPage1[0].NumericIdentifier[0])/V(1234567)>>
    <</T(form1[0].#pageSet[0].MasterPage1[0].Date[0])/V(today)>>
    <</T(form1[0].Page38-SectionZ[0].Z0500[0].Z0500Body[0].Z0500BYear[0])/V(1999)>>
    ]>>>>
    endobj
    trailer
    <</Root 1 0 R>>
    %%EOF

    FWIW I gave up on the idea.  Using the fdf to launch the PDF has a major weakness (for my needs) in that it still allows the user to edit the form.  I just want them to be able to print it.  Perhaps I could defiene it as not editable, but I've got it working where I merge the two data streams on the backend and return the PDf as the response.

  • Problem in rendering pdf

    Hi,
    I need to render a XDP File with XML File to produce a PDF Document.
    I came to know that there are 2 Serivce's which i can make use of it..
    1.generetePDF
    2.renderPDFForm
    Service : generatePDF
    When i tried using this Service  i got the PDF File..but its a Static PDF File.. i can't Edit the PDF File.
    I want a PDF file which i can EDIT Manually..
    And i want to know how to use renderPDFForm Service to generate PDF from the given inputs both xdp and xml file.
    Please help me out to solve this problem....!
    Thanks,
    kruthi

    Hi,
    You have to use renderPDF service if you wish  that dynamic interactive pdf form will be the output of your process.
    Set the name of your xdp template in the "Form to Render" field, name of the xml file data as a "Form Data" and enter the path to your template as "Content Root URI".
    In the output section set the name of the variable to hold the rendered document in the "Rendered Form" field.
    Note that the path should be started with: "repository:///" and then the path to your template.
    For example if the name of you tempate is form.xdp and it is located in Forms folder of your repository, you should set form.xdp as Form to Render and "repository:///Forms" as Content Root URI.
    Hope this helps,
    Yan.

  • Generating PDF from Flex BarChart

    Hello,
    I am new to Flex. Have been playing with creating Advanced
    Data Grid and Bar Charts for our application prototype and would
    like to explore how to create a PDF file of the BarChart or other
    charting components.
    The requirement is simple. We show the BarChart and a button
    to view it as a PDF. When the user presses the button, the PDF
    viewing dialog should come up and the user can opt to save the PDF
    or view it (the standard way a browser deals with the PDF).
    Have read blogs, this forum and LiveCycle docs but don't
    understand clearly how Flex communicates with
    LiveCycle ES (or PDF Generator) to display the PDF. Any ideas
    or tutorials that does this would be appreciated.
    Thanks,
    Kannan

    In order to generate a PDF document, you have to call a
    method on a Java remote object that uses the XFAHelper and pass it
    some arguments.
    I modified the PDFService example in the documentation so I
    can:
    1- specify any document as opposed to hardcoding the PDF
    template name
    2- write the PDF to a file as opposed to writing it in the
    user's session
    Here is the source:
    package com.mycompany.flex.remoteObjects;
    import java.io.File;
    import java.io.IOException;
    import org.w3c.dom.Document;
    import flex.acrobat.pdf.XFAHelper;
    import flex.messaging.FlexContext;
    import flex.messaging.util.UUIDUtils;
    public class PDFService
    public PDFService()
    public Object generatePDF(Document dataset, String
    PDFdocument) throws IOException
    // Open shell PDF
    String source =
    FlexContext.getServletContext().getRealPath("/pdfgen/" +
    PDFdocument);
    int index = source.indexOf("./");
    if(index != -1 )
    // Remove the ./ added by UNIX
    source = source.substring(0, index) + source.substring(index
    + 2, source.length());
    XFAHelper helper = new XFAHelper();
    helper.open(source);
    // Import XFA dataset
    helper.importDataset(dataset);
    // Create a unique ID
    String uuid = UUIDUtils.createUUID(false);
    source =
    FlexContext.getServletContext().getRealPath("/dynamic-pdf/" + uuid
    + "_" + PDFdocument);
    index = source.indexOf("./");
    if(index != -1 )
    // Remove the ./ added by UNIX
    source = source.substring(0, index) + source.substring(index
    + 2, source.length());
    // Create the file object
    File file = new File(source);
    // Save the file
    helper.save(file);
    // Close any resources
    helper.close();
    return (uuid + "_" + PDFdocument);
    pdfgen is the folder where my PDF template resides.
    dynamic-pdf is the folder where the generated PDF are saved.
    These two folders are located under flex.war at the first
    level.
    In Flex, I wrote a Cairngorm command that calls this remote
    object and displays the generated PDF:
    package com.mycompany.core.commands
    import com.adobe.cairngorm.commands.ICommand;
    import com.adobe.cairngorm.control.CairngormEvent;
    import com.adobe.cairngorm.business.Responder;
    import
    com.mycompany.core.business.GenerateAndOpenPDFDelegate;
    import
    com.mycompany.core.control.event.GenerateAndOpenPDFEvent;
    import com.mycompany.core.model.ModelLocator;
    import flash.net.navigateToURL;
    import flash.net.URLRequest;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    import mx.collections.*;
    import mx.core.Application;
    import mx.controls.Alert;
    public class GenerateAndOpenPDFCommand implements ICommand,
    Responder
    [Bindable]
    private var model:ModelLocator = ModelLocator.getInstance();
    public function GenerateAndOpenPDFCommand():void
    public function execute(event:CairngormEvent):void
    trace("Executing GenerateAndOpenPDFCommand...");
    var delegate : GenerateAndOpenPDFDelegate = new
    GenerateAndOpenPDFDelegate( this );
    var generateAndOpenPDFEvent : GenerateAndOpenPDFEvent =
    event as GenerateAndOpenPDFEvent;
    delegate.generateAndOpenPDF( generateAndOpenPDFEvent.pdfVO
    public function onResult( event : * = null ) : void
    var item:Object;
    var result:String = (event as ResultEvent).result as String;
    trace("GenerateAndOpenPDFCommand::onResult\n\n" + result);
    if (result)
    // Open the generated PDF in a new window
    navigateToURL(new URLRequest(ModelLocator.FLEX_URL +
    "dynamic-pdf/" + result), "_blank");
    // Hide the progress bar overlay
    Application.application.requestProgressBar.visible = false;
    Application.application.requestProgressBar.progressBar.source =
    null;
    Application.application.requestProgressBar.progressBar.label
    = this.model.languageDictionary["000012"];
    public function onFault( event : * = null ) : void
    // Hide the progress bar overlay
    Application.application.requestProgressBar.visible = false;
    Application.application.requestProgressBar.progressBar.source =
    null;
    // Debug
    Alert.show("GenerateAndOpenPDFCommand:\n\n" + (event as
    FaultEvent).message);
    FLEX_URL is created in this way some place else in the
    application:
    // Get the server URL from the Application's
    var server:String = Application.application.url;
    var index:uint = server.indexOf("Shell"); // Shell is the
    name of my app folder
    server = server.substring(0, index);
    // This is the flex.war/ URL
    ModelLocator.FLEX_URL = server;
    Of course, it would be better to save the PDF in the user's
    session as Adobe suggests, but I couldn't figure out how they use
    the PDFResourceServlet. First of all, I had to get its code.
    I had to decompile the java class files in the samples to get
    the source of the PDFResourceServlet as it is not in the
    documentation. Here it is:
    package com.mycompany.flex.remoteObjects;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class PDFResourceServlet extends HttpServlet
    public PDFResourceServlet()
    protected void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
    doPost(req, res);
    protected void doPost(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
    String id = req.getParameter("id");
    if(id != null)
    HttpSession session = req.getSession(true);
    try
    byte bytes[] = (byte[])(byte[])session.getAttribute(id);
    if(bytes != null)
    res.setContentType("application/pdf");
    res.setContentLength(bytes.length);
    res.getOutputStream().write(bytes);
    } else
    res.setStatus(404);
    catch(Throwable t)
    System.err.println(t.getMessage());
    private static final long serialVersionUID =
    0x7180e4383e53d335L;

Maybe you are looking for