Alpha DevCon 2018
Page 2 of 2 FirstFirst 12
Results 31 to 42 of 42

Thread: Download and view PDF on an iPhone

  1. #31
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,787

    Default Re: Download and view PDF on an iPhone

    Peter, your script worked perfect for me, no error. Even if the filename had embedded space.


    <%a5
    dim PDFFile as c = "D:\temp\my file.pdf"
    Response.MIME_Type = "application/pdf"
    ? file.to_blob(PDFFile)
    %>


    Be sure your security framework allows PDF files.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  2. #32
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,544

    Default Re: Download and view PDF on an iPhone

    Quote Originally Posted by Steve Wood View Post
    Peter, your script worked perfect for me, no error. Even if the filename had embedded space.
    Thanks Steve, see my previous post(s). The pdf was corrupt. All is well now.

  3. #33
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,787

    Default Re: Download and view PDF on an iPhone

    Do you mean my pdf was corrupt? Isn't that my original file in your first example?
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  4. #34
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,544

    Default Re: Download and view PDF on an iPhone

    Quote Originally Posted by Steve Wood View Post
    Do you mean my pdf was corrupt? Isn't that my original file in your first example?
    Yes. I just downloaded a new copy and it is good now.

    BTW: nice graphics

  5. #35
    Member
    Real Name
    Wendy Welton
    Join Date
    Feb 2011
    Location
    Hampton & North Hampton NH
    Posts
    809

    Default Re: Download and view PDF on an iPhone

    Quote Originally Posted by WendyWelton View Post



    So - next challenge is to dynamically get the correct file name into it from a button on a grid. I'm guessing I have to do a variable?

    I just saw Steve Wood's post - looks like it deals with the dynamic file name. I'll see if I can make heads or tails of that.
    Wendy Welton
    Architect
    past & future Alphaholic - deliberately falling off the wagon!

    http://www.artformhomeplans.com/

  6. #36
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,787

    Default Re: Download and view PDF on an iPhone

    Man, sorry if I was responsible for 30 posts! Lately I have wimped out an use the feature pack, file download, so I don't even know what code is being used.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  7. #37
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,544

    Default Re: Download and view PDF on an iPhone

    Quote Originally Posted by Steve Wood View Post
    Man, sorry if I was responsible for 30 posts! Lately I have wimped out an use the feature pack, file download, so I don't even know what code is being used.

    What's perverse is that I had this problem a long time ago and so I gave up trying to make it work. And at that time your file didn't even exist. I don't know, maybe back then I had the other header info in there.
    ===
    Edit: Lenny, having the default header info doesn't seem to matter - it still works just fine. The secret is - don't use a corrupt file!

  8. #38
    Member
    Real Name
    Wendy Welton
    Join Date
    Feb 2011
    Location
    Hampton & North Hampton NH
    Posts
    809

    Default Re: Download and view PDF on an iPhone

    Quote Originally Posted by Steve Wood View Post
    Man, sorry if I was responsible for 30 posts! Lately I have wimped out an use the feature pack, file download, so I don't even know what code is being used.
    No need to apologize! That short page displays, no download function. It looks like your first code section does have a download feature as well? My builders need to see it on their iPhone, email it on to supplier, supplier needs to download. So - I need that too.

    Question - it looks like this has a session variable called "filename". So, in my grid that has many records, each record referencing a different PDF via a referenced field - I need to do an "on push" that puts the correct name into the session variable? Am I on the right track?
    Wendy Welton
    Architect
    past & future Alphaholic - deliberately falling off the wagon!

    http://www.artformhomeplans.com/

  9. #39
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Download and view PDF on an iPhone

    I usually don't like spaces in filenames, I'd recommend underscores.

  10. #40
    Member
    Real Name
    Wendy Welton
    Join Date
    Feb 2011
    Location
    Hampton & North Hampton NH
    Posts
    809

    Default Re: Download and view PDF on an iPhone

    New news:

    http://downloads.limelightapp.com/ - you run it first, then browse to the web site. When I browse to my Download File button, made with the File Download feature pack - it works! You can either view or download. Wahoo!
    Wendy Welton
    Architect
    past & future Alphaholic - deliberately falling off the wagon!

    http://www.artformhomeplans.com/

  11. #41
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    521

    Default Re: Download and view PDF on an iPhone

    I stumbled over this old post.
    Is this still working, than I might choose this over the phonegap option.
    Or dit IOS closed this option?
    Ger Kurvers
    Alpha Anywhere / V4.5.1 - Build 4642_4981 12-Oct-2017
    Development: Mysql, windows 10 64 Applicationserver: standard on Windows server 2012 R2

  12. #42
    Member
    Real Name
    Jan Jedrasik
    Join Date
    May 2017
    Posts
    56

    Default Re: Download and view PDF on an iPhone

    Quote Originally Posted by cptutrecht View Post
    I stumbled over this old post.
    Is this still working, than I might choose this over the phonegap option.
    Or dit IOS closed this option?
    Phonegap should be able to do this fine with the "cordova-open" plugin.

Similar Threads

  1. Force PDF to download
    By pvin2011 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 03-12-2011, 11:31 PM
  2. PDF damaged on download
    By tdietrich in forum Application Server Version 9 - Web/Browser Applications
    Replies: 1
    Last Post: 08-02-2009, 09:48 AM
  3. How do I open and view a .pdf
    By Jeff@Listbrokers in forum Alpha Five Version 7
    Replies: 4
    Last Post: 11-08-2006, 12:51 PM

Bookmarks

Posting Permissions

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