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

Receiving 500 Internal Server error using Save-to-PDF Link

kc2keo wrote on 2011-10-13:
Hi all,

Most of the time the Save-to-PDF service is working just fine but sometimes the server throws a 500 internal server error. Strange thing is that during the time I receive the error the site directly works fine but the downloaded PDF displays the error. Other URL->PDF services out there also would throw 500 error. The error goes away on its own after a bit. Maybe it is due to how I programmed the link into the website? I do not have access to the server logs (working on obtaining access) which I think should help debug the issue. I just want to be 100% sure I am not receiving the error due to something I did.

The page automatically loads the Save-to-PDF link using JavaScript and user is prompted to download PDF. Should the server be throwing the 500 error the downloaded PDF shows 500 error.

You can see it in action here (Click the "PDF Brochure" button):
http://tbcny.com/members/tbc_-_members.asp

Hope you can decipher what I am saying lol.

Regards,
--George
support wrote on 2011-10-15:
It is strongly discouraged to use /url_to_pdf/ the way you use it since it causes recursion. Please, don't assign /url_to_pdf/ to location.href on load but use a link or a button instead.

Regarding the 500 error, it is hard to say. Your code causes that your page is loaded several times within a very short period of time due to recursion which may cause the occasional hiccup.
kc2keo wrote on 2011-10-15:
edit: deleted...