I've got a web application that creates pdf docs using Aspose.PDF. When opening some (but not all) of these documents, I receive an error in Acrobat Reader 5.0.5 (and 7.0): "There was an error opening this document. The file does not exist."
If I save the doc to disk then double-click, the doc is opened correctly. If I use the OpenInBrowser SaveType, the doc opens in the browser correctly. However, my requirements are that Acrobat should be opened.
Does the document that can be opened always can’t be opened when you run many times? Is it possible for you to provide an example that can reproduce this error?
Yesterday I finally deployed the pdf feature to my website. During a conference call meeting of several users, I walked them through the usage of the feature. Unfortunately, two of my users received this error. Given that the users are at remote locations, it was impossible to perform any detailed debugging or troubleshooting. I do know however, that one user was using Acrobat Reader 5.0 and one was using 6.0.
Given the nature of the error message, “The file does not exist.”, I’m wondering if Aspose.PDF encountered an issue while attempting to create the file (perhaps in a temporary location) before launching Acrobat Reader. When using the SaveType.OpenInAcrobat option, does Aspose.PDF require some amount of temporary disk space?
Do you have any additional insight as to how I might troubleshoot this issue?
One more thing…this does not appear to be document-specific. In other words, one of my users attempted to open up doc number 4109 and received the error. I was able to open up doc number 4109 successfully.
I have tested this issue and found if you choose SaveType.OpenInAcrobat, the pdf will be saved in the temp internet folder (maybe in some sub folder) and be taken as a attachement of the HTML.
In fact, I used the following code in the Pdf.Save method: if(saveType == SaveType.OpenInAcrobat) response.AddHeader(“content-disposition”,“attachment; filename=” + fileName);
In my test, I used file name “AlphabeticalList.pdf”. If I choose “save the file to disk”, the filename is correct. But if choose “open in Acrobat”, the opend file name is “AlphabeticalList[1].pdf”.
I hope this info can help you to solve your problem.