Generate a PDF of what the user sees and sending it as a binary stream to the server

Hi all

On the last page of our Flex application, allow us to print a copy of what they seized for their own records.

I wonder if there is a way for me, by program, to generate a PDF document that is the same as their impression (I move a container to the button 'print' I've got to the user) and send those bytes on the server.  We can store this PDF file as well as all of their data, and it would be useful as a 'snapshot' of exactly what the user saw when they presented their requests.

Im looking in the generation of PDF Flex but so far haven't got this figured out.  I thought some people here might be able to point me in the right direction.

Thank you!

-Josh

Here's how you can take a snapshot.

import mx.graphics.ImageSnapshot;
import mx.graphics.codec.IImageEncoder;
import mx.graphics.codec.PNGEncoder;
import mx.utils.Base64Encoder;
private function uploadImage(rSource:IBitmapDrawable):void
               {
                    var tBitmapData:BitmapData = ImageSnapshot.captureBitmapData(rSource);

                    var tEnc:IImageEncoder = new PNGEncoder();
                    var tBA:ByteArray = tEnc.encode(tBitmapData);
                    var tB64:Base64Encoder = new Base64Encoder();
                    tB64.encodeBytes(tBA);
                    // send tB64.toString() using POST to the server to save the image.
               }

call

uploadImage (this) / / where the parameter is an object to get the snapshot. Can be anything including demand. ("this" in my case).

Tags: Flex

Similar Questions

  • Is there a way to detect if the PDF file is the original of our server, or a local copy.

    Hello

    We are currently generating very large PDF files in our industry that contains industrial revenue and users should always use the latest version (one located on the server - the pdf has always the same path and file name)

    We already had bad experiences when users were using a file that has been saved on the desktop and was obsolete.

    We want to do is only to print the PDF file from the server and disable printing when the file is on the desktop, or in any other place.

    So my question is: are there at - it a way to read the path to the file when printing and disable printing or use addwatermarkfromtext if the path is not the path to the server?

    I hope my question is clear and I will find a solution.

    Thank you.

    A script can be used to detect the location of the file, but you can't stop to print. However, you can display a warning label if it is not located at the desired location. So let's say you set a text field hidden with the warning message, called "PrintWarning". You can then use something like this as a script Will Print the file:

    if (this.path!="....") { // here you need to enter the path of the file on the network drive, which you can get from the console by executing this.path
        app.alert("Error! You should not print this file from your local computer!");
        this.getField("PrintWarning").display = display.noView; // The field will be visible on the print, but not on screen
    } else this.getField("PrintWarning").display = display.hidden;
    

    PS. I'm moving your question to the Acrobat JavaScript forum, where he is best.

  • PDF printer on the print server

    Is there a way to just install the PDF printer on the server of printing instead of having to install it on each client and still not break any EULA? Would it not possible to do if you also bought an Adobe Acrobat license for all computers? Is this the only solution for this? What we like is minimal administration and a tiled solution and we don't have any use for other features in Adobe Acrobat. If the only way is to install and or purchase a license for each computer sepparate, we may have to turn to other PDF printers to get something affordable?

    Best regards

    Christian

    LiveCycle PDF Generator is the business solution. Acrobat cannot be installed as a server process no matter how many licenses you buy.

  • Error reading from a file on the server

    Mine is 9i and 11.5.10.2 database oracle application server

    I'm reading the PDF file of the server, I used the code below

    l_bfile:=BFILENAME('\u05\app\applmgr\11i\oraclecomn\admin\out\jamuna_server','o7742576.out');
    If DBMS_LOB. FILEEXISTS (l_bfile) = 1 then
    dbms_output.put_line ('Exists!");
    dbms_output.put_line (DBMS_LOB. GetLength (l_bfile));
    on the other
    dbms_output.put_line ('Not Exists!");
    end if;


    I used slashes (/) instead of forward slashes (\) too and I also made the dbms_output.put_line (to_char (dbms_lob.getlength (l_bfile)));


    When you use the dbms_log package, I got the below error. I'm a little worried because I created the directory and donna sufficicent privileges too.

    Error report:
    ORA-00604: an error has occurred at the SQL level 1 recursive
    ORA-01460: dead letter or unreasonable conversion requested
    ORA-06512: at "SYS." DBMS_LOB", line 485
    ORA-06512: at line 24

    I do not know bfilename('\u05\app\applmgr\11i\oraclecomn\admin\out\jamuna_server','o7742576.out') is give BFILE that is empty.

    Can you please suggest me what I can do to go further? What kind of privileges it requires point and read the file from the server?

    Please help me in this.

    Thanks in advance

    I suspect that you do not use a directory object is the problem.
    Here is the official description of bfilename
    http://download.Oracle.com/docs/CD/B10501_01/server.920/a96540/functions12a.htm#SQLRF00610

    ------------
    Sybrand Bakker
    Senior Oracle DBA

  • Please EXAMINE MY, MY IP ID AND SEND VERIFICATION CODE to MY EMAIL ADDRESS THAT IS * E-mail address is removed from the privacy *.

    Hi, I'm the real owner of the * address email is removed from the privacy * I know the secret code and my password but I do not use my secondary e-mail that is written on my info, so I can't get the verification code.  I just reset my password for 10. time I guess, but I can not connect. He said that my account is temporarily blocked.   It's probably the 20. time that I write in the forum (first of all here)

    I'm tired to write my problem several times...

    In short, it is the solution that should be made by you: study please me (Bank of the IP ID represents what you name it) and send the email address verification code * address email is removed from the privacy * so I can connect without problems.

    Please help me as soon as possible...

    I'm crazy for 5 days...

    I posted this on Windows Live solution center as a Windows live ID section but nobody helps me for 5 days...

    They all seem like they are robots. (they are just giving the links that I have overcome several times)

    Really give wages to sending links like bots?  Everything I know how employees think about their job because I have 30 under my command.

    I know the problem I know that the solution that they take effect only but no one... HELP ME AS SOON AS POSSIBLE PLEASE...

    I got this e-mail in order to recover * address email is removed from the privacy... *

    Where I put my complaint? Can I use my network and get in touch with Microsoft officials that I already know? or someone will solve my problem as soon as possible?

    Hi tolkiii,

    We cannot help with issues such as changing the alternative e-mail address without being able to connect to the Windows Live account.

    You must wait for a response from the Windows Live Solutions Center.

    Check out the link using Windows Live:

    http://windowslivehelp.com/product.aspx?ProductID=1

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer

  • In PDFs generated by FM 11, expands the wee for some paragraphs.  What causes this?

    In the PDF files that I generate using FM 11, broadens the wee for some paragraph tags.  I see no difference in the properties of the paragraph tag.  Sometimes, this causes the spread in the margin or even outside the borders of the table, as shown in the examples in the text.

    Notice that I use the option "Save as PDF".

    Please see attached examples that show the PDF output and the source of the FM about the same thing.  Note that extra word spacing does not occur in each paragraph.

    What causes this and how can I solve this problem?

    Adobe-example-1.pngAdobe-FM source-1.pngAdobe-example-2.pngAdobe-FM source-2.png

    Maybe, but here's what Microsoft said to the

    http://msdn.Microsoft.com/en-us/library/Windows/desktop/aa511282.aspx

    Segoe UI and Segoe are not the same font. Segoe UI is the Windows font for text user interface strings. Segoe is a brand used by Microsoft and its partners to produce materials for printing and advertising.

  • Print to Adobe PDF format generates the PDF, but also generates an error entry in the print queue

    I am running Windows Vista Ultimate Edition and Adobe Acrobar 8.
    Whenever I print a document in PDF format, the PDF document is generated correctly.
    Unfortunately, it also generates an error entry in the Adobe PDF print queue. At each system restart Windows Live One Care detects errors and ask me to fix.

    Hello Pino Sannicolo,

    Try to check your print to the printer settings. Right-click on the printer, and then click Properties. Click the Advanced tab and then click on "print directly to printer". Dave D
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to generate an output PDF report when the layout template is an Excel file in the editor of BI 11.1.1.7

    That's what I did...

    1. create the new report

    2 create a report using an existing data model (browse and choose a data model)

    3. How do you create your report? (click used report editor)

    4. click on finished (and then saved the report)

    5. then he asked me to create the page layout (I chose to download or generate a layout and then traveled to a downloaded my model with XDO_ * the columns of the excel data model mappings)

    Template file = model Excel, locale = English (United States)

    5. click on Upload

    6. then click view the report top-right, which has opened my file name of "my_report_layoutname.xls" with sheet report 1 (OPE all mapped very well) and a sheet of xdo_metadata.

    I just wanted to step 6 is a sheet 1 pdf report.    How do I do that?  Could not find the place where I can clarify that.

    Mr. Jamal

    Layouts Excel generate only one exit Excel. (CSV takes no account of the provision is therefore an option for any layout.)

    You use RTF or PDF or page Template Builder (XPT) layouts to generate PDFS.

    The LOV to find output formats by modifying the report and selecting a list.

    The table has a column to the output formats, it is controlled by the format of the presentation that you have built.

    Kevin

  • I need help! I try to open my PDF but I get this message on my Macbook Pro! "Before you display PDF documents in the browser, you must launch Adobe Reader and accept the end user license agreement, and then quit and relaunch the browser."

    I need help! I try to open my PDF but I get this message on my Macbook Pro! "Before you display PDF documents in the browser, you must launch Adobe Reader and accept the end user license agreement, and then quit and relaunch the browser." What should I do?

    Do exactly what the message says, and it will go away.

  • Generate a PDF file with sections invisible made visible through the code

    I have a poll with several which are either visible or hidden based on the selection of the user to a yes / no radio no button group.  The user can then present the investigation by e-mail or print the survey.  If the user prints the investigation before being submitted, all invisible made visible that user input are included in the printed copy; However, when the pdf file is generated to be attached to the presentation of the e-mail or saved using Save as, items that have been made visible by the code do not appear in the pdf file.  Here's the code used in the Yes option button:

    Comp4WhenImplementText.presence = "invisible";

    Comp4WhenImplement.presence = "invisible";

    Comp4MajorFactorText.presence = "invisible";

    Comp4WhenImplement.Comp4When03 = 0;

    Comp4WhenImplement.Comp4WhenNever = 0;

    If (Comp4No.selectedIndex! = - 1 |)

    Page3.COMP1.Comp1No.SelectedIndex! = -1 ||

    Page4.Comp2.Comp2No.SelectedIndex! = -1)

    {

    CorrectiveAction.presence = "visible";

    }

    on the other

    {

    CorrectiveAction.presence = "invisible";

    }

    The code in the box is as follows:

    Comp4WhenImplementText.presence = "visible".

    Comp4When.presence = "visible".

    CorrectiveAction.presence = "visible".

    The code in the button to send E-mail:

    Form1. #subform [12]. Button2::click - (JavaScript, client)

    If (CorrectiveAction.presence == 'visible')

    {

    If ((CorrectiveAction.rawValue == null) |) (CorrectiveAction.rawValue == ""))

    }

    on the other

    {

    Button1.execEvent ("Click");

    }

    {

    on the other

    {

    Button1.execEvent ("Click");

    }

    Button1 is invisible and laminates under visible e-mail submit button.  It actually supports the PDF by email.  The visible button performs a test and displays a message to the user if the user survey responses fail.  I also tried 'hidden' in all areas that are listed as 'invisible '.

    That should be added or changed so that the invisible elements of the survey that are made visible by the code can be seen in the pdf of the survey.  Any help would be greatly appreciated.

    There is a parameter that indicates it takes to save the changes via the code to the form upon registration. In the goto file/properties/Defaults form designer and make sure that the Radiobutton control that is named automatically under the Scripting to preserve changes to the form upon registration is set to.

    Paul

  • Right side of the text in the report are cut during report generated in PDF format

    Right side of the text in the report are cut during report generated in PDF format.
    In the report layout text is FLUSH JUSTIFIED. Text block is the same size as the outer frame.
    When the report is generated in PDF format, text is only JUSTIFIED to the LEFT and to the right looks like cut. Text beyond frame is invisible.
    But when I text selection in the PDF report that all the text is selected and I can copy and paste this text into any editor.
    What is a cause of this error and how can I solve this problem? In my view, there is error in report engine.
    Report Server Version: 10.1.2.3.0

    See photo. [http://1.bp.blogspot.com/_tSW8j23gT08/TKXn84zyRMI/AAAAAAAAAGE/KkNibanTSao/s1600/report_error.JPG]

    Don't know what your operating system and it could make a difference. If you're on Unix/Linux, try changing the uifont.ali file. (make a backup first!).

    Here is an example of the changes that I made to correct a similar problem:

    # Mapping of MS Windows

    #Arial = helvetica
    # 'Courier New' = courier
    # "Times New Roman" = times
    #Modern = helvetica
    #"MS Sans Serif" = helvetica
    # "MS Serif" = times
    # "Small fonts" = helvetica

    #Arial = 'arial.ttf '.
    Arial = helvetica.8
    "Courier New" = courier.9
    Arial.12 = helvetica.8
    #helvetica.12.Bold = helvetica.9
    #ArilMT is helvetica.9
    # "Albertus Extra Bold" = helvetica.9

    [PDF]

    #Arial = courier
    #arial = courier

    # Support for the languages of the far East:

    #itcadvantgardegothic = arial
    # "ITC front guard Gothic" = arial
    #itcadvantgardegothic = arial
    # "ITC Avant Garde Gothic" = Arial
    # changed to courier 06-25-2009
    itcadvantgardegothic = Helvetica
    #itcadvantgardegothic = arial
    "ITC Avant Garde Gothic" = Helvetica.11

    # Required
    #itcadvantgardegothic = arial
    # "ITC Avant Garde Gothic" = Arial

    [PDF:Subset]

    #times = "times.ttf".
    #courier = "cour.ttf.
    #helvetica = 'arial.ttf '.
    #arial = 'arial.ttf '.
    #helvetica = 'arial.ttf '.
    # 'Avant Garde' = 'arial.ttf '.
    #arial = 'arial.ttf '.
    #helvetica = 'arial.ttf '.
    #arial = 'arial.ttf '.
    #itcadvantgardegothic = 'arial.ttf '.
    #helvetica = 'arial.ttf '.
    #courier = "cour.ttf.

  • I have a problem, I want to save my book, I did the photos, in pdf format and send to print as I did last Christmas, in the latest version of Iphoto, it wasn't a problem, but now I can't do what a plus! Can you help me?

    I have a problem,

    I want to save my book, I did the pictures 1.1, in pdf format and send to print as I did last Christmas, in the latest version of Iphoto, it wasn't a problem, but now I can't do what a plus! Can you help me?

    You can create a preview PDF of your photobook by Ctrl-clicking on the empty space betwwen discovers the pages in the Pages of 'all '.  Select "Save book as PDF" in the context menu that appears.  Then send this overview to your printer.

  • By mistake I disabled all user accounts and cannot connect to my dell latitude d610 laptop computer. Tried going into the bios and turning off everything, what does not work!

    By mistake I disabled all my user accounts and cannot connect to my laptop, the Dell Latitude d610. I tried to restart in all modes as well as rotating directors passwords and disable in the bios. Nothing works!

    Hi kathleenvickers,

    1. How you have disabled all the user accounts on the computer?
    2. What do you find in the login screen when you restart the computer?

    See the articles below and check if it helps.

    How to connect to your Windows XP-based computer if you forget your password or if your password expires

    http://support.Microsoft.com/kb/321305

    Microsoft's strategy concerning lost or forgotten passwords

    http://support.Microsoft.com/kb/189126

  • This product key for Vista Ultimate is for 2 users; the computer tells me that it is already in use, and it is the second computer. Then I don't understand what the problem is.

    product activation key

    This product key for Vista Ultimate is for 2 users; the computer tells me that it is already in use, and it is the second computer. Then I don't understand what the problem is.

    There is no such thing as a ' 2 License User"for Windows.

    It * may * be for 2 processors. These 2 processors MUST be on the same physical motherboard.

    You use WIndows out-of-contract of license and will have to purchase a new license to the second machine.

  • I recently bought the camcorder FDRAX33. I wanted to know what card users would recommend?

    I recently bought the camcorder FDRAX33. I wanted to know what card users would recommend? I don't want to spend a lot of money. Thank you!

    If you want to use a Sony card, consider the Sony 64 GB SDXC Memory Card (class 3 speed) UHS - I (Sony #SF64UX/TQN).  If you record video 4K, then you can consider the Sony - 64 GB UHS - I (class 10/U3) SDXC memory card (Sony #SF64UZ/TQN).  The difference, other than the second being about twice the price as the first, is the writing speed.

    Sony compatible cards

    64GB SanDisk Extreme Pro UHS - I memory card SDXC U3 (class 10) (SanDisk #SDSDXP - 064 G - A46) is another option and is cheaper than the Sony U3 version.

    Of course there are higher capacity cards.

Maybe you are looking for

  • Assessment of my account

    I was advised to validate my Apple ID but safarI opens the page to that I'm headed

  • Bluetooth on Satellite A200

    Hello world You just bought an Equium A200 one there pc world television advertising, the box says Bluetooth on it. Y at - it Bluetooth already installed inside?

  • Ban the fields with the same entry?

    I wonder if anyone knows if it is possible in number to format the cells in a way that does not allow cells with the same input. I'm creating a list of products with bar codes and want to be reassured that nothing of the barcode will be accidentally

  • DAQmxWaitUntilTaskDone overflow error

    Lately, I've been running into a problem with the DAQmxWaitUntilTaskDone command. I'll put a program that generates a square (of sorts) wave, and I find that if I leave the program running for a day or two, I get an error of overflow on the DAQmxWait

  • wrk54g as a bridge/extender

    I would use my wrk54g as a bridge/extender with the uverse gateway. Someone could lead me in the right direction? Thank you.