This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Intermittent problem when saving as PDF

sonnyramsay wrote on 2012-05-25:
We've been using pdfcrowd for a couple of months now without any problems. A week ago we started seeing an intermittant problem with saving to pdf on our website. Instead of converting the page and asking to save as file, it is redirecting to https://pdfcrowd.com/. At first it was occurring on all browsers, then it worked perfectly on all browsers a few hours later. Now for the past few days it works on all browsers except for IE. This is happening for multiple users on multiple machines. You can give it a try now if you like at the following page: http://bit.ly/LoJkbk . Click on the 'save as PDF' link at the bottom left of the main content paragraph. Any ideas?
support wrote on 2012-05-27:
Hello,

according to our logs the browsers did not send the Referer HTTP header field sometimes. The referer information is required for the "Save to PDF Link" service to work properly. If the browser does not send it then the service can't generate PDF as it does not know the URL of the page to convert.

You can check if a browser sends the referer information by clicking this link.

All decent browsers with default settings send the referer field. Here are possible reasons why our service did not receive the referer information.

  • The browser will not send the referer information if you are on an https version of a page and the link does not point to another secure location.

    In your particular case, the link will not work on e.g.:
    https://www.careinnovations.com/proactive-virtual-healthcare
    

    unless you change the link to
    https://pdfcrowd.com/url_to_pdf/?use_print_media=1
    



  • Antivirus software can be configured to blank or replace the referer header.
  • A proxy server or firewall can manipulate the HTTP request and alter the referer field.
  • The browser can be configured to turn it off.


Does this help?
sonnyramsay wrote on 2012-05-28:
I have disabled my Antivirus, and tried on a couple different networks to rule out the firewall.

I checked the referrer field and the value is 'http://www.careinnovations.com/proactive-virtual-healthcare', which is http and matches the request on the page 'http://pdfcrowd.com/url_to_pdf/?use_print_media=1' which is also http. However the response is an 'HTTP/1.1 301 Moved Permanently' and then a 'HTTP/1.1 302 FOUND' redirect to 'https://pdfcrowd.com/'. Could this be a server side issue? See screen capture...(http://screencast.com/t/H2T5kcpcMlME). If so, it's curious to me why it would happen so consistently in IE and less consistently in other browsers.

Thanks for your assistance.
support wrote on 2012-05-29:
I noticed that when I click the link the browser actually sends two requests. The first to "http://069-moc-981.mktoresp.com/webevents/clickLink?.." and the second to "http://pdfcrowd.com/url_to_pdf/". This is visible also in your screencast at 0:17, see the screenshot attached to this post.

Please ensure that clicking the link sends a request to "http://pdfcrowd.com/url_to_pdf/" only and let me know if it helps?

Regarding to the 301 and 302 redirects, if there is no referer information then /url_to_pdf/ redirects (301) to http://pdfcrowd.com. Since you are logged in into your Pdfcrowd account you are redirected again (302) to the secured version of our web site (https://pdfcrowd.com).
sonnyramsay wrote on 2012-05-29:
Disabled the script for "http://069-moc-981.mktoresp.com/webevents/clickLink?.." so it is no longer included. But the issue is still there (http://screencast.com/t/sgayeTqJZH). Any other ideas?
support wrote on 2012-05-29:
It seems that the browser caches the 301 response since 1) the screencast shows that the response time is <1ms and 2) we do not see the request in our log. Can you clear the browser cache and try again?
sonnyramsay wrote on 2012-05-29:
We changed the page links to point to 'https://pdfcrowd.com/url_to_pdf/?use_print_media=1' which seems to work when viewing our site from both http and https.

After clearing the browser cache and cookies it looks like the page is working correctly. Thanks for your help! ;-)