opening pdf files

Results 1 to 7 of 7

Thread: opening pdf files

  1. #1
    keno Guest

    Default opening pdf files

    Perhaps someone can help me with a problem I am having. We have a form that will, when fired, create a pdf file based on info provided by the user. What I would like to do, is immediately after the pdf file is created, display it, and then delete the file from the server. So my question is how can I display the pdf file? I can delete the file no problem, but I just don&#039t know how to automatically/immediately display the pdf file after its creation. Any help would be greatly appreciated.<BR><BR>Thanks a lot,<BR>Keno

  2. #2
    Steve Cimino Guest

    Default RE: opening pdf files

    ASSUMING the user already has Adobe installed, you simply use that as your URL. It will then display in the browser:<BR><BR>http://yourserver/yourpage.pdf

  3. #3
    keno Guest

    Default RE: opening pdf files

    How can I fire that url immediatly though? I would use javascript, but I have to delete the file from the server side, so it will be deleted before it is launched on the client. And in this case all users will have Adobe installed.

  4. #4
    PratQ Guest

    Default RE: opening pdf files

    From asp, just do a response.redirect using the new PDF as the URL.

  5. #5
    PratQ Guest

    Default Scratch that last response

    I didnt read your requirements fully. If you want to send the file and then delete it immediately, one way to accomplish that is to have an ASP page that creates and sends the file and another that does the delete.<BR><BR>It would work like this:<BR><BR>1. User activates the PDF create ASP page 1.<BR>2. ASP page 1 creates the PDF file, and returns a 2 frame frameset to the user.<BR>3. The frameset frame 1 loads the PDF.<BR>4. The frameset frame 2 has window_onload javascript that delays for x number of seconds (to give the download time to happen), then calls the ASP page 2 that does the delete.<BR><BR>If you are only using IE for this app, you can get tricky with invisible IFRAMES, and I believe the DOM for IE even has specific events you can use to make your PDF file has loaded successfully. But a tiny frame2 and a timer should work for both types.<BR>

  6. #6
    keno Guest

    Default RE: opening pdf files

    A good idea, which would work. However, if I redirect to the file, I wouldn&#039t be able to delete it. Unless you might have an idea as to how I could.

  7. #7
    keno Guest

    Default RE: Scratch that last response

    Thank you I will try this and see what I can come up with. Thank you very much for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts