WEB Web Application creating/saving PDF not working in IE outside of network (Coldfusion)

Discussion in 'OT Technology' started by jdw, Feb 12, 2010.

  1. jdw

    jdw New Member

    Joined:
    Dec 31, 2005
    Messages:
    4,429
    Likes Received:
    0
    Location:
    ND
    I don't even know if there are Coldfusion programmers here...:hs:

    Trying to save a PDF.
    works fine in Firefox anywhere.
    only work with Internet Explorer if I'm on the same network as our servers.
    I can take the same box and bounce between 2 networks at the office and it only works if I'm on the one network. Fails outside of the building as well so I'm ruling out any security settings on the second network in office.

    Code:
    <cfsavecontent variable="testdata">
            Test information
    </cfsavecontent>
    
    <cfheader name="Pragma" value="public">
    <cfheader name="Expire" value="0">
    <cfheader name="Cache-Content" value="must-validate,post-check=0,pre-check=0">
    <cfheader name="Content-type" value="application-download">
    <cfheader name="Content-Length" value="#len(testdata)#">
    <cfheader name="Content-Disposition" value="attachment; filename=test.pdf">
    <cfheader name="Content-Transfer-Encoding" value="binary">
    
    <cfdocument format="PDF"><cfoutput>#testdata#</cfoutput></cfdocument>
    
    I keep trying different combinations of headers trying to find something that might work but I'm getting nowhere.
     
  2. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,652
    Likes Received:
    15
    Location:
    Atlanta
    is the pdf content static or fluid? IE do you have a fill in form that you're trying to fill in based on the users' input? If that's the case, look here (https://hrapps.fsu.edu/formswizard3/) at an app i made for FSU. If that's what you want, i can help you out.
     
  3. jdw

    jdw New Member

    Joined:
    Dec 31, 2005
    Messages:
    4,429
    Likes Received:
    0
    Location:
    ND
    I don't want to fill out 10 pages of content. Is that just taking all of that information and building a PDF then?

    My project is a dynamic reporting tool. Marketing makes a few choices (client and date) and we mine Analytics data and send the client a PDF report (or that's the plan).
     
  4. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,652
    Likes Received:
    15
    Location:
    Atlanta
    Well, if you have a pdf "shell" that has simple fill-in text boxes with ID's, I know how to make CF fill it in.
     
  5. jdw

    jdw New Member

    Joined:
    Dec 31, 2005
    Messages:
    4,429
    Likes Received:
    0
    Location:
    ND
    I don't know that a pre-generated 'shell' will work because of the differences in our reports between clients.

    There has to be something either in the headers that I'm missing or some coldfusion config that is causing it - even though neither one would make sense to me when taking into account that Firefox works all the time (so I doubt its server config) and IE works on the same network (so I'd think the headers are 'ok')...

    Might try putting together something with PHP yet this afternoon and test that and see if that gives me any more ideas.
     
  6. jdw

    jdw New Member

    Joined:
    Dec 31, 2005
    Messages:
    4,429
    Likes Received:
    0
    Location:
    ND
    well for shits and giggles I'll post the solution.

    All of our site traffic is run through a CDN EXCEPT for our network - our traffic goes right to the load balancers.
    Turns out our CDN is setting the Cache-Control header to a value that causes problems for IE. From what we found this has been a problem with IE since at least IE6. Its a documented bug that they apparently aren't worried about fixing.
     
  7. ace3

    ace3 mouthify my wang.

    Joined:
    May 4, 2001
    Messages:
    122,632
    Likes Received:
    22
    Location:
    Omaha NebrASSka Posts: 15
    damn, i thought i was the only person that had cf code here. :o

    any CF programmers here do work on the side? i don't do CF, but occasionally, we need someone to fix something. :dunno:
     
  8. jdw

    jdw New Member

    Joined:
    Dec 31, 2005
    Messages:
    4,429
    Likes Received:
    0
    Location:
    ND
    :o I applied for a PHP/MySQL developer job a little over 2 years ago and found out I was going to be writing CF. I had never heard of CF prior to that.

    Been here since and don't mind the language. Most of my development is Coldfusion (now with the Mach-ii framework). Occasionally work with PHP on small projects that sit on another box.

    I haven't gone out looking for side jobs but I'm not sure I'd turn one down if it was offered. Depends just how much 'fix' needs to be done I guess.
     
  9. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,652
    Likes Received:
    15
    Location:
    Atlanta
    :wavey:

    :werd: I learned CF at an internship. I applied to a job that was php/mysql, but they weren't paying nearly enough. Then i found my current job. Didn't know it was CF until my first day on the job... good thing i already knew it.
     

Share This Page