Welcome Guest, Not a member yet? Register   Sign In
msg while generate large pdf file
#11

[eluser]Damien K.[/eluser]
No one go to that url -- it is a virus! Just kidding... Smile

Obviously it doesn't work because that is the Wikipedia website...

Anyway, since your test page is inaccessible, here is the new pseudo-code:

- Click on link
- Dynamically show waiting icon, possibly with text “Generating document…”
- When completed, the PDF document will load as usual

Hmm, actually, that is the same as before. To elaborate, you click on the link (server generates PDF and it takes a while), do your spinner thingy when the link is clicked, and when it is finished generating your PDF it will AUTOMATICALLY load in the same window (via Adobe Reader). That does not work? Which part are you stuck on? Are you trying to show a "Ready to download" link instead?
#12

[eluser]kmil0[/eluser]
hi Damian, thanks for your replay.
and sorry for the test page, i forgot the :

http://nerp.senscore.net/test.php.

the problem is when a user does not have the adobe plugin for the browser, in my case.
when the file is generated pop-up a window with

"save" and "open with".

Smile
#13

[eluser]Damien K.[/eluser]
My browser froze! Okay, we get the point -- it takes REALLY long. Just curious -- does it ever finish or are you just looping indefinitely? Oh, it is done... and I also get the prompt to download the PDF document even when I do have the plugin. Oh look, those guys make a LOT of money!

1) If the user don't have the plugin, then they will likely get a prompt to download the file instead. You can't "fix" this.
2) You want the finished PDF to open up in the browser (via Adobe Reader), however we (you and I) are getting the download prompt instead. I believe you need to set the correct http headers so the browser is aware of the mime type and will use the registered plugin for that type to open it automatically.

EDIT: A little off topic, you can probably tweak your, presumably, SQL query for better performance.
#14

[eluser]InsiteFX[/eluser]
You would need to set an Ajax event for it to notify you of the completion.

Enjoy
InsiteFX
#15

[eluser]kmil0[/eluser]
hi guys.

thanks for the replays.
I have try with ajax. but with not success, in jQuery I try this


Code:
$("#link").click(function(e) {
   op = {
        url:'url_to_pdf',
        dataType: // what could be the data type to recieve from the server??
        success: function(d)
        {
           // what to do when I have the RAW PDF data in d ???  
        }
     }
     $.ajax(op);
});

I try with something like this. but with not success Sad
This is making me sick :S

thanks! Smile




Theme © iAndrew 2016 - Forum software by © MyBB